const w = new BrowserWindow({
webPreferences: {
enableRemoteModule: true
}
})
在Electron 9中,在未通过enableRemoteModule WebPreferences选项显式启用远程模块的情况下,使用远程模块开始发出警告。在Electron 10中,远程模块现在默认禁用。要使用远程模块,必须在WebPreferences中指定enableRemoteModule:true
In Electron 9, using the remote module without explicitly enabling it via the enableRemoteModule WebPreferences option began emitting a warning. In Electron 10, the remote module is now disabled by default. To use the remote module, enableRemoteModule: true must be specified in WebPreferences:
网友评论