Merge pull request #1472 from thecodingmachine/type_module

Switching API to use type="module" scripts
This commit is contained in:
David Négrier 2021-12-07 09:23:58 +01:00 committed by GitHub
commit d68da0754e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
const scriptUrl = urlParams.get('script'); const scriptUrl = urlParams.get('script');
const script = document.createElement('script'); const script = document.createElement('script');
script.src = scriptUrl; script.src = scriptUrl;
script.type = "module";
document.head.append(script); document.head.append(script);
</script> </script>
</head> </head>

View File

@ -311,7 +311,7 @@ class IframeListener {
"//" + "//" +
window.location.host + window.location.host +
'/iframe_api.js" ></script>\n' + '/iframe_api.js" ></script>\n' +
'<script src="' + '<script type="module" src="' +
scriptUrl + scriptUrl +
'" ></script>\n' + '" ></script>\n' +
"<title></title>\n" + "<title></title>\n" +