From 492efafb098f4fc2d6860a7786a8603db71d7d64 Mon Sep 17 00:00:00 2001 From: Sean Li Date: Wed, 10 Sep 2014 23:31:52 -0700 Subject: [PATCH] Window options to allow loading local files. --- index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 3956f970bd..58d006cf6c 100644 --- a/index.js +++ b/index.js @@ -127,7 +127,16 @@ app.on('ready', function() { } // Create the browser window. - mainWindow = new BrowserWindow({width: 800, height: 578, frame:false, resizable: false}); + var windowOptions = { + width: 800, + height: 578, + frame: false, + resizable: false, + 'web-preferences': { + 'web-security': false + } + }; + mainWindow = new BrowserWindow(windowOptions); // and load the index.html of the app. mainWindow.loadUrl(url); @@ -135,4 +144,3 @@ app.on('ready', function() { mainWindow.focus(); }); }); -