@lvce-editor/iframe-worker 5.23.0 → 5.25.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.
- package/dist/iframeWorkerMain.js +17 -1
- package/package.json +1 -1
package/dist/iframeWorkerMain.js
CHANGED
|
@@ -1776,6 +1776,8 @@ const create3 = async ({
|
|
|
1776
1776
|
const permissionPolicyString = permissionPolicy.join('; ');
|
|
1777
1777
|
const iframeCsp = platform === Web ? csp : '';
|
|
1778
1778
|
const credentialless = getCredentialLess(locationHost);
|
|
1779
|
+
|
|
1780
|
+
// TODO remove this
|
|
1779
1781
|
await invoke$4('ExtensionHostManagement.activateByEvent', `onWebView:${webViewId}`);
|
|
1780
1782
|
const portId = create$1();
|
|
1781
1783
|
const remotePathPrefix = '/remote';
|
|
@@ -1810,6 +1812,19 @@ const getSecret = async key => {
|
|
|
1810
1812
|
return invoke('WebView.getSecret', key);
|
|
1811
1813
|
};
|
|
1812
1814
|
|
|
1815
|
+
const getWebViewInfo = webViewId => {
|
|
1816
|
+
const rpcs = getAll();
|
|
1817
|
+
for (const value of Object.values(rpcs)) {
|
|
1818
|
+
if (value.webViewId === webViewId) {
|
|
1819
|
+
return {
|
|
1820
|
+
uid: value.webViewUid,
|
|
1821
|
+
origin: value.origin
|
|
1822
|
+
};
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
return undefined;
|
|
1826
|
+
};
|
|
1827
|
+
|
|
1813
1828
|
const saveState = async () => {
|
|
1814
1829
|
const all = getAll();
|
|
1815
1830
|
const serialized = [];
|
|
@@ -1833,7 +1848,8 @@ const commandMap = {
|
|
|
1833
1848
|
'WebView.create2': create2,
|
|
1834
1849
|
'WebView.create3': create3,
|
|
1835
1850
|
'WebView.saveState': saveState,
|
|
1836
|
-
'WebView.getSecret': getSecret
|
|
1851
|
+
'WebView.getSecret': getSecret,
|
|
1852
|
+
'WebView.getWebViewInfo': getWebViewInfo
|
|
1837
1853
|
};
|
|
1838
1854
|
|
|
1839
1855
|
const listen = async () => {
|