@lvce-editor/iframe-worker 5.4.0 → 5.5.0

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.
@@ -1110,7 +1110,7 @@ const getWebViewOrigin = (webViewPort, platform, webViewScheme, webViewId) => {
1110
1110
 
1111
1111
  const getIframePermissionPolicy = webView => {
1112
1112
  const extensionAllow = webView.allow || [];
1113
- return extensionAllow;
1113
+ return ['cross-origin-isolated', ...extensionAllow];
1114
1114
  };
1115
1115
 
1116
1116
  const getWebViews = async () => {
@@ -1291,6 +1291,10 @@ const create2 = async ({
1291
1291
  const portId = create$1();
1292
1292
  await register(previewServerId, webViewPort, frameAncestors, webViewRoot, csp, iframeContent, platform, webViewId);
1293
1293
  await invoke$1('WebView.create', id, iframeSrc, sandbox, iframeCsp, credentialless, permissionPolicyString, frameTitle);
1294
+
1295
+ // TODO maybe iframe waitForLoad is not needed. since it cannot be used detect errors anyway
1296
+ // and causes flash of unstyled content, maybe a better way would be to just send the
1297
+ // port and wait for the first port message
1294
1298
  await invoke$1('WebView.load', id);
1295
1299
  const origin = getWebViewOrigin(webViewPort, platform, webViewScheme, webViewId);
1296
1300
  const portType = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/iframe-worker",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "Web Worker to manage creation and lifecycle of iframes in Lvce Editor",
5
5
  "main": "dist/iframeWorkerMain.js",
6
6
  "type": "module",