我想使用targetOrigin of postMessage在preload.js和renderer.js之间验证/区分消息的起源,并启用contextIsolation。因此,如果消息来自preload.js,则originTarget类似于file://preload.js,并且来自渲染器file://renderer.js。设置file://preload.js或file://renderer.js,生成错误
我目前正在使用Vue和Electron,并希望使用以下命令重新启动应用程序 import { app } from 'electron';
name: 'Homeapp.relaunch() }} 但是当我导入电子时,我得到的是fs.existsSync is not a function 我还试着使用
我正在使用Vue CLI 3和vue-cli-plugin-electron-builder封装我的Vue电子应用程序,我无法获得我的preload.js脚本的电子工作。/src/preload.js") // works but window.electron.dialog in undefined});const { dialog
renderer_init.js:91 Unable to load preload script: C:\Users\Desktop\Projects\Electron-Apps\Electron\src\preload.jsjs2c/renderer_init.js:91 Error: contextBridge API can only be used when contextIsolation is enabled 我的preload.js不知道为什么它不能加载我的preload.js文件。在我用eslint将我的默认格式