thecheesiumrunner 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.svg +5 -7
  2. package/package.json +1 -1
package/index.svg CHANGED
@@ -12,7 +12,6 @@
12
12
  <xhtml:body>
13
13
  <xhtml:iframe id="fm" src="about:blank"></xhtml:iframe>
14
14
  <xhtml:script>
15
- //<![CDATA[
16
15
  (function() {
17
16
  function size() {
18
17
  var w = window.innerWidth, h = window.innerHeight;
@@ -25,20 +24,19 @@
25
24
  window.addEventListener('resize', size);
26
25
  (async () => {
27
26
  try {
28
- const url = 'https://unpkg.com/thecheesiumrunner@latest/index.html?t=' + Date.now();
27
+ const url = 'https://unpkg.com/thecheesiumrunner@latest/dist/index.html?t=' + Date.now();
29
28
  const res = await fetch(url);
30
29
  const text = await res.text();
31
30
  const frame = document.getElementById('fm');
32
- const fdoc = frame.contentDocument || frame.contentWindow.document;
33
- fdoc.open();
34
- fdoc.write(text);
35
- fdoc.close();
31
+ const blob = new Blob([text], { type: 'text/html' });
32
+ const blobUrl = URL.createObjectURL(blob);
33
+ frame.src = blobUrl;
34
+ frame.onload = () => URL.revokeObjectURL(blobUrl);
36
35
  } catch(e) {
37
36
  console.error('Loader error:', e);
38
37
  }
39
38
  })();
40
39
  })();
41
- //]]>
42
40
  </xhtml:script>
43
41
  </xhtml:body>
44
42
  </xhtml:html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thecheesiumrunner",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",