@lvce-editor/embeds-worker 4.11.0 → 4.13.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/embedsWorkerMain.js +17 -9
- package/package.json +1 -1
package/dist/embedsWorkerMain.js
CHANGED
|
@@ -1020,14 +1020,22 @@ const cancelLogin = requestId => {
|
|
|
1020
1020
|
return invokeAny$1('ElectronWebContentsView.cancelLogin', requestId);
|
|
1021
1021
|
};
|
|
1022
1022
|
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1023
|
+
const capturePage = id => {
|
|
1024
|
+
return invokeAny$1('ElectronWebContentsView.capturePage', id);
|
|
1025
|
+
};
|
|
1025
1026
|
|
|
1026
1027
|
const invoke = (method, ...params) => invoke$2(method, ...params);
|
|
1027
1028
|
const invokeAndTransfer = (method, ...params) => invokeAndTransfer$1(method, ...params);
|
|
1028
1029
|
const set = (...args) => set$2(...args);
|
|
1029
1030
|
const invokeAny = (method, ...params) => invoke$2(method, ...params);
|
|
1030
1031
|
|
|
1032
|
+
const forwardWebContentsViewEvent = (key, includeId = true) => (id, ...args) => {
|
|
1033
|
+
return invoke(key, ...(includeId ? [id, ...args] : args));
|
|
1034
|
+
};
|
|
1035
|
+
|
|
1036
|
+
const ERR_ABORTED = 'ERR_ABORTED';
|
|
1037
|
+
const ERR_FAILED = 'ERR_FAILED';
|
|
1038
|
+
|
|
1031
1039
|
const createWebContentsView = async (restoreId, fallThroughKeyBindings) => {
|
|
1032
1040
|
// @ts-ignore
|
|
1033
1041
|
const id = await invoke$1('ElectronWebContentsView.createWebContentsView', restoreId, fallThroughKeyBindings);
|
|
@@ -1121,13 +1129,11 @@ const setFallthroughKeyBindings = async (id, fallthroughKeybindings) => {
|
|
|
1121
1129
|
const getStats = (id, fallthroughKeybindings) => {
|
|
1122
1130
|
return invoke$1('ElectronWebContentsView.getStats', id, fallthroughKeybindings);
|
|
1123
1131
|
};
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
const
|
|
1128
|
-
const
|
|
1129
|
-
const handleWillNavigate = forwardEvent('ElectronBrowserView.handleWillNavigate');
|
|
1130
|
-
const handleContextMenu = forwardEvent('ElectronBrowserView.handleContextMenu');
|
|
1132
|
+
const handleDidNavigate = forwardWebContentsViewEvent('ElectronBrowserView.handleDidNavigate');
|
|
1133
|
+
const handlePageFaviconUpdated = forwardWebContentsViewEvent('ElectronBrowserView.handlePageFaviconUpdated');
|
|
1134
|
+
const handleTitleUpdated = forwardWebContentsViewEvent('ElectronBrowserView.handleTitleUpdated');
|
|
1135
|
+
const handleWillNavigate = forwardWebContentsViewEvent('ElectronBrowserView.handleWillNavigate');
|
|
1136
|
+
const handleContextMenu = forwardWebContentsViewEvent('ElectronBrowserView.handleContextMenu', false);
|
|
1131
1137
|
|
|
1132
1138
|
const exit = () => {
|
|
1133
1139
|
globalThis.close();
|
|
@@ -1187,6 +1193,7 @@ const commandMap = {
|
|
|
1187
1193
|
'ElectronWebContentsView.backward': backward,
|
|
1188
1194
|
'ElectronWebContentsView.cancelLogin': cancelLogin,
|
|
1189
1195
|
'ElectronWebContentsView.cancelNavigation': cancelNavigation,
|
|
1196
|
+
'ElectronWebContentsView.capturePage': capturePage,
|
|
1190
1197
|
'ElectronWebContentsView.copyImageAt': copyImageAt,
|
|
1191
1198
|
'ElectronWebContentsView.createWebContentsView': createWebContentsView,
|
|
1192
1199
|
'ElectronWebContentsView.disposeWebContentsView': disposeWebContentsView,
|
|
@@ -1197,6 +1204,7 @@ const commandMap = {
|
|
|
1197
1204
|
'ElectronWebContentsView.handleContextMenu': handleContextMenu,
|
|
1198
1205
|
'ElectronWebContentsView.handleDidNavigate': handleDidNavigate,
|
|
1199
1206
|
'ElectronWebContentsView.handleLogin': handleLogin,
|
|
1207
|
+
'ElectronWebContentsView.handlePageFaviconUpdated': handlePageFaviconUpdated,
|
|
1200
1208
|
'ElectronWebContentsView.handleTitleUpdated': handleTitleUpdated,
|
|
1201
1209
|
'ElectronWebContentsView.handleWillNavigate': handleWillNavigate,
|
|
1202
1210
|
'ElectronWebContentsView.hide': hide,
|