xpe 1.0.7 → 1.0.8
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/dist/kernel/iframe.js +5 -1
- package/package.json +1 -1
package/dist/kernel/iframe.js
CHANGED
|
@@ -727,7 +727,11 @@ function wrapInlineScriptWithSandbox(code) {
|
|
|
727
727
|
}
|
|
728
728
|
function createExecNextScriptContent() {
|
|
729
729
|
return [
|
|
730
|
-
|
|
730
|
+
// This helper is injected as a classic script repeatedly. `const` would
|
|
731
|
+
// create a global lexical binding and fail on the second queued script
|
|
732
|
+
// (notably when Vite's dev client precedes the app entry). `var` is
|
|
733
|
+
// intentionally used so each queue step remains re-entrant.
|
|
734
|
+
"var sandbox = window.__XPE_INTERNAL_SANDBOX__;",
|
|
731
735
|
"if(sandbox.execQueue && sandbox.execQueue.length){ sandbox.execQueue.shift()()}",
|
|
732
736
|
].join("");
|
|
733
737
|
}
|