24electron 报@electron/remote is disabled for this WebContents. Call require("@electron/remote/m

Posted handsomeziff

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了24electron 报@electron/remote is disabled for this WebContents. Call require("@electron/remote/m相关的知识,希望对你有一定的参考价值。

electron 报@electron/remote is disabled for this WebContents. Call require("@electron/remote/main").enable(webContents) to enable it.

在创建窗口地方加上这句:

require("@electron/remote/main").enable(shotWin.webContents);  //

 

 

以上是关于24electron 报@electron/remote is disabled for this WebContents. Call require("@electron/remote/m的主要内容,如果未能解决你的问题,请参考以下文章

electron-packager打包报错

Electron – 项目报错整理(打包~2): electron-packager踩坑

electron 中渲染进程报错可能原因

Electron常见问题 57 - 解决报错:Apple failed to notarize your application

Electron常见问题 58 - 解决报错:code object is not signed at all

electron踩坑以及与远端页面交互