@zzdadelu/schema-builder 1.0.0-alpha.51 → 1.0.0-alpha.52
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.
- package/es/createIframe.js +1 -20
- package/lib/createIframe.js +1 -20
- package/package.json +1 -1
package/es/createIframe.js
CHANGED
|
@@ -7,25 +7,6 @@ export default (function () {
|
|
|
7
7
|
iframe.width = '100%';
|
|
8
8
|
iframe.height = '100%';
|
|
9
9
|
iframe.frameBorder = '0';
|
|
10
|
-
|
|
11
|
-
// 使用 Blob URL 避免缓存问题
|
|
12
|
-
var htmlContent = createIframeContent();
|
|
13
|
-
var blob = new Blob([htmlContent], {
|
|
14
|
-
type: 'text/html'
|
|
15
|
-
});
|
|
16
|
-
var url = URL.createObjectURL(blob);
|
|
17
|
-
iframe.src = url;
|
|
18
|
-
|
|
19
|
-
// 清理 Blob URL
|
|
20
|
-
iframe.onload = function () {
|
|
21
|
-
setTimeout(function () {
|
|
22
|
-
return URL.revokeObjectURL(url);
|
|
23
|
-
}, 1000);
|
|
24
|
-
console.log('[XRender] Iframe loaded with Blob URL');
|
|
25
|
-
};
|
|
26
|
-
iframe.onerror = function (error) {
|
|
27
|
-
console.error('[XRender] Iframe load error:', error);
|
|
28
|
-
URL.revokeObjectURL(url);
|
|
29
|
-
};
|
|
10
|
+
iframe.srcdoc = createIframeContent();
|
|
30
11
|
return iframe;
|
|
31
12
|
});
|
package/lib/createIframe.js
CHANGED
|
@@ -13,25 +13,6 @@ var _default = exports.default = function _default() {
|
|
|
13
13
|
iframe.width = '100%';
|
|
14
14
|
iframe.height = '100%';
|
|
15
15
|
iframe.frameBorder = '0';
|
|
16
|
-
|
|
17
|
-
// 使用 Blob URL 避免缓存问题
|
|
18
|
-
var htmlContent = createIframeContent();
|
|
19
|
-
var blob = new Blob([htmlContent], {
|
|
20
|
-
type: 'text/html'
|
|
21
|
-
});
|
|
22
|
-
var url = URL.createObjectURL(blob);
|
|
23
|
-
iframe.src = url;
|
|
24
|
-
|
|
25
|
-
// 清理 Blob URL
|
|
26
|
-
iframe.onload = function () {
|
|
27
|
-
setTimeout(function () {
|
|
28
|
-
return URL.revokeObjectURL(url);
|
|
29
|
-
}, 1000);
|
|
30
|
-
console.log('[XRender] Iframe loaded with Blob URL');
|
|
31
|
-
};
|
|
32
|
-
iframe.onerror = function (error) {
|
|
33
|
-
console.error('[XRender] Iframe load error:', error);
|
|
34
|
-
URL.revokeObjectURL(url);
|
|
35
|
-
};
|
|
16
|
+
iframe.srcdoc = createIframeContent();
|
|
36
17
|
return iframe;
|
|
37
18
|
};
|