Skip to content

Commit f711948

Browse files
committed
ES Module Shims 1.3.3
1 parent d23f24b commit f711948

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

app/assets/javascripts/es-module-shims.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ES Module Shims 1.3.2 */
1+
/* ES Module Shims 1.3.3 */
22
(function () {
33

44
const edge = navigator.userAgent.match(/Edge\/\d\d\.\d+$/);
@@ -298,8 +298,7 @@
298298
const iframe = document.createElement('iframe');
299299
iframe.style.display = 'none';
300300
document.head.appendChild(iframe);
301-
// we use document.write here because eg Weixin built-in browser doesn't support setting srcdoc
302-
iframe.contentWindow.document.write(`<script type=importmap nonce="${nonce}">{"imports":{"x":"data:text/javascript,"}}<${''}/script><script nonce="${nonce}">import('x').then(()=>1,()=>0).then(v=>parent._$s(v))<${''}/script>`);
301+
iframe.src = createBlob(`<script type=importmap nonce="${nonce}">{"imports":{"x":"data:text/javascript,"}}<${''}/script><script nonce="${nonce}">import('x').then(()=>1,()=>0).then(v=>parent._$s(v))<${''}/script>`, 'text/html');
303302
})
304303
]);
305304
});

app/assets/javascripts/es-module-shims.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)