@cloudbase/cals 1.2.21-alpha.2 → 1.2.21-alpha.5
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.
|
@@ -517,7 +517,7 @@ function loadProdMetaScript(bundleName, filename) {
|
|
|
517
517
|
// 从下面这段是 iframe-srcdoc.src.js 中搞出来的
|
|
518
518
|
const scriptStr = "window.addEventListener('error', (event) => {\n" +
|
|
519
519
|
' parent.postMessage(\n' +
|
|
520
|
-
" { status: 'error', error: `meta bundle
|
|
520
|
+
" { status: 'error', error: `meta bundle load failed: ${event?.message || ''} ${document.currentScript.src}` },\n" +
|
|
521
521
|
' origin,\n' +
|
|
522
522
|
' );\n' +
|
|
523
523
|
'});\n' +
|
|
@@ -554,7 +554,9 @@ function loadProdMetaScript(bundleName, filename) {
|
|
|
554
554
|
</body>
|
|
555
555
|
</html>
|
|
556
556
|
`;
|
|
557
|
-
iframe.
|
|
557
|
+
iframe.addEventListener('load', () => {
|
|
558
|
+
iframe.contentWindow.postMessage({ filename, bundleName, moduleName }, window.location.origin);
|
|
559
|
+
});
|
|
558
560
|
document.body.appendChild(iframe);
|
|
559
561
|
}
|
|
560
562
|
catch (e) {
|
|
@@ -513,7 +513,7 @@ function loadProdMetaScript(bundleName, filename) {
|
|
|
513
513
|
// 从下面这段是 iframe-srcdoc.src.js 中搞出来的
|
|
514
514
|
const scriptStr = "window.addEventListener('error', (event) => {\n" +
|
|
515
515
|
' parent.postMessage(\n' +
|
|
516
|
-
" { status: 'error', error: `meta bundle
|
|
516
|
+
" { status: 'error', error: `meta bundle load failed: ${event?.message || ''} ${document.currentScript.src}` },\n" +
|
|
517
517
|
' origin,\n' +
|
|
518
518
|
' );\n' +
|
|
519
519
|
'});\n' +
|
|
@@ -550,7 +550,9 @@ function loadProdMetaScript(bundleName, filename) {
|
|
|
550
550
|
</body>
|
|
551
551
|
</html>
|
|
552
552
|
`;
|
|
553
|
-
iframe.
|
|
553
|
+
iframe.addEventListener('load', () => {
|
|
554
|
+
iframe.contentWindow.postMessage({ filename, bundleName, moduleName }, window.location.origin);
|
|
555
|
+
});
|
|
554
556
|
document.body.appendChild(iframe);
|
|
555
557
|
}
|
|
556
558
|
catch (e) {
|