@lvce-editor/main-process 2.7.0 → 2.8.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.
@@ -6739,6 +6739,20 @@ const getDomTree = async view => {
6739
6739
  const slimCode = getSlimCode(result);
6740
6740
  return slimCode;
6741
6741
  };
6742
+ const insertCss = async (view, code) => {
6743
+ const {
6744
+ webContents
6745
+ } = view;
6746
+ const key = await webContents.insertCSS(code);
6747
+ return key;
6748
+ };
6749
+ const executeJavaScript = async (view, code) => {
6750
+ const {
6751
+ webContents
6752
+ } = view;
6753
+ const key = await webContents.executeJavaScript(code);
6754
+ return key;
6755
+ };
6742
6756
  const reload = view => {
6743
6757
  const {
6744
6758
  webContents
@@ -7212,6 +7226,9 @@ const commandMap = {
7212
7226
  'ElectronWebContentsViewFunctions.cancelNavigation': wrapBrowserViewCommand(cancelNavigation),
7213
7227
  'ElectronWebContentsViewFunctions.copyImageAt': wrapBrowserViewCommand(copyImageAt),
7214
7228
  'ElectronWebContentsViewFunctions.focus': wrapBrowserViewCommand(focus),
7229
+ 'ElectronWebContentsViewFunctions.insertCss': wrapBrowserViewCommand(insertCss),
7230
+ 'ElectronWebContentsViewFunctions.executeJavaScript': wrapBrowserViewCommand(executeJavaScript),
7231
+ 'ElectronWebContentsViewFunctions.insertJavaScript': wrapBrowserViewCommand(executeJavaScript),
7215
7232
  'ElectronWebContentsViewFunctions.forward': wrapBrowserViewCommand(forward),
7216
7233
  'ElectronWebContentsViewFunctions.getStats': wrapBrowserViewCommand(getStats),
7217
7234
  'ElectronWebContentsViewFunctions.hide': hide,
@@ -7818,7 +7835,10 @@ const Commands$4 = {
7818
7835
  setIframeSrc: wrapBrowserViewCommand(setIframeSrc),
7819
7836
  setIframeSrcFallback: wrapBrowserViewCommand(setIframeSrcFallback),
7820
7837
  show: show,
7821
- getDomTree: getDomTree
7838
+ getDomTree: wrapBrowserViewCommand(getDomTree),
7839
+ insertCss: wrapBrowserViewCommand(insertCss),
7840
+ executeJavaScript: wrapBrowserViewCommand(executeJavaScript),
7841
+ insertJavaScript: wrapBrowserViewCommand(executeJavaScript)
7822
7842
  };
7823
7843
 
7824
7844
  const ElectronWebContentsViewFunctions_ipc = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-process",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "lvce-editor",