You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2019/03/11 03:51:53 UTC

[cordova-electron] branch master updated: Remove nodeIntegration Warning by Setting Default to False (#37)

This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-electron.git


The following commit(s) were added to refs/heads/master by this push:
     new a23a0a2  Remove nodeIntegration Warning by Setting Default to False (#37)
a23a0a2 is described below

commit a23a0a2a7bf295e734f4f3b1a5d90283a7565cf0
Author: エリス <er...@users.noreply.github.com>
AuthorDate: Mon Mar 11 12:51:49 2019 +0900

    Remove nodeIntegration Warning by Setting Default to False (#37)
    
    * Remove nodeIntegration Warning by Setting Default to False
---
 bin/templates/project/cdv-electron-main.js       | 3 ++-
 bin/templates/project/cdv-electron-settings.json | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/templates/project/cdv-electron-main.js b/bin/templates/project/cdv-electron-main.js
index 9312ece..ae4945b 100644
--- a/bin/templates/project/cdv-electron-main.js
+++ b/bin/templates/project/cdv-electron-main.js
@@ -41,7 +41,8 @@ function createWindow () {
     mainWindow = new BrowserWindow({
         width: 800,
         height: 600,
-        icon: appIcon
+        icon: appIcon,
+        webPreferences: cdvElectronSettings.webPreferences
     });
 
     // and load the index.html of the app.
diff --git a/bin/templates/project/cdv-electron-settings.json b/bin/templates/project/cdv-electron-settings.json
index cd5b813..ac65b67 100644
--- a/bin/templates/project/cdv-electron-settings.json
+++ b/bin/templates/project/cdv-electron-settings.json
@@ -1,3 +1,6 @@
 {
-    "isRelease": false
+    "isRelease": false,
+    "webPreferences": {
+        "nodeIntegration": false
+    }
 }
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org