electron加载项目输入账号和密码不能登录!!!

大宝 4966 0

莱芜做网站做排名的大宝今天发现一个问题,有个朋友从electron官网上下载了一个demo,然后改了一下网址,项目首页加载出来后,输入账号和密码不能登录!!!

win = new BrowserWindow({width: 1080,minWidth: 680,height: 840, resizable: true, skipTaskbar:false,
webPreferences: {contextIsolation:false, nodeIntegration:true,nodeIntegrationInWorker: true ,experimentalCanvasFeatures:true,experimentalFeatures:true,plugins:true,}
});
//contextIsolation:true  就可以登陆啦,默认值为false。

为什么呢?

electron 采用的是NODE.JS,而node.js和jQuery是不兼容的啦。你的网站有jQuery吧?

但是还有一个问题,当contextIsolation:true时,ipcMain.on是无效的,不能使用主副进程通信模块。哪位兄弟有好的解决办法,可以留言哦。莱芜做网站排名的大宝谢谢您喽。

抱歉,评论功能暂时关闭!