@lvce-editor/extension-host-worker 3.9.0 → 3.11.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.
|
@@ -3117,6 +3117,8 @@ const commandMap$1 = {
|
|
|
3117
3117
|
'WebView.compatRendererProcessInvokeAndTransfer': (...args) => invokeAndTransfer$1('WebView.compatRendererProcessInvokeAndTransfer', ...args),
|
|
3118
3118
|
// @ts-ignore
|
|
3119
3119
|
'WebView.compatRendererWorkerInvokeAndTransfer': (...args) => invokeAndTransfer$1(...args),
|
|
3120
|
+
// @ts-ignore
|
|
3121
|
+
'WebView.compatRendererWorkerInvoke': (...args) => invoke$2(...args),
|
|
3120
3122
|
'WebView.compatSharedProcessInvoke': (...args) => invoke$2('WebView.compatSharedProcessInvoke', ...args),
|
|
3121
3123
|
'WebView.getSavedState': (...args) => invoke$2('WebView.getSavedState', ...args),
|
|
3122
3124
|
'WebView.getWebViewInfo': (...args) => invoke$2('WebView.getWebViewInfo', ...args),
|
|
@@ -4147,6 +4149,9 @@ const loadWebView = async (providerId, savedState) => {
|
|
|
4147
4149
|
await rpc.provider.create(rpc, rpc.uri, savedState);
|
|
4148
4150
|
};
|
|
4149
4151
|
|
|
4152
|
+
/**
|
|
4153
|
+
* @deprecated
|
|
4154
|
+
*/
|
|
4150
4155
|
const serializeWebView = async webView => {
|
|
4151
4156
|
if (webView && webView.provider && webView.provider.saveState) {
|
|
4152
4157
|
const saved = await webView.provider.saveState();
|
|
@@ -4157,6 +4162,10 @@ const serializeWebView = async webView => {
|
|
|
4157
4162
|
}
|
|
4158
4163
|
return undefined;
|
|
4159
4164
|
};
|
|
4165
|
+
|
|
4166
|
+
/**
|
|
4167
|
+
* @deprecated
|
|
4168
|
+
*/
|
|
4160
4169
|
const serializeWebViews = async webViews => {
|
|
4161
4170
|
const serialized = [];
|
|
4162
4171
|
for (const [key, value] of Object.entries(webViews)) {
|
|
@@ -4170,10 +4179,19 @@ const serializeWebViews = async webViews => {
|
|
|
4170
4179
|
}
|
|
4171
4180
|
return serialized;
|
|
4172
4181
|
};
|
|
4182
|
+
const getAdditional = () => {
|
|
4183
|
+
try {
|
|
4184
|
+
return invoke('WebView.saveState');
|
|
4185
|
+
} catch {
|
|
4186
|
+
return [];
|
|
4187
|
+
}
|
|
4188
|
+
};
|
|
4173
4189
|
const saveState = async () => {
|
|
4174
4190
|
const webViews = getWebViews();
|
|
4175
4191
|
const serialized = await serializeWebViews(webViews);
|
|
4176
|
-
|
|
4192
|
+
const additional = await getAdditional();
|
|
4193
|
+
const all = [...serialized, ...additional];
|
|
4194
|
+
return all;
|
|
4177
4195
|
};
|
|
4178
4196
|
|
|
4179
4197
|
const fileMapUrl = `${assetDir}/config/fileMap.json`;
|
package/package.json
CHANGED