What's the outcome of setting node-integration to false when creating a new browser window in Electron?

落花浮王杯 提交于 2019-12-10 01:45:48

问题


In order to get jQuery to load and function correctly in a HTML page I was opening in Electron (formerly Atom Shell), I had to disable Node integration when creating the BrowserWindow in my main.js file.

Can someone please tell me what setting node-integration: false will keep me from being able to do that I would normally be able to do had I not disabled it?


回答1:


Setting node-integration to false will disable node.js in the renderer process - i.e. your app can only do what a web browser will do. Instead of doing this, use Zepto.js which is compatible with Electron and has the same API.



来源:https://stackoverflow.com/questions/29860278/whats-the-outcome-of-setting-node-integration-to-false-when-creating-a-new-brow

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!