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