diff --git a/index.html b/index.html index 6067932..bcac184 100644 --- a/index.html +++ b/index.html @@ -1,16 +1,17 @@ + - + - - - Hello World! - - + + +

Hello World!

- We are using Node.js , - Chromium , - and Electron . - +

+ We are using Node.js , + Chromium , + and Electron . +

+ \ No newline at end of file diff --git a/main.js b/main.js index 7c125bd..77812d9 100644 --- a/main.js +++ b/main.js @@ -1,8 +1,13 @@ const { app, BrowserWindow } = require('electron') -const createWindow = () => { +const path = require('path') + +function createWindow () { const win = new BrowserWindow({ width: 800, - height: 600 + height: 600, + webPreferences: { + preload: path.join(__dirname, 'preload.js') + } }) win.loadFile('index.html')