From eccff4aafcdbbad93ed0ee1f6243079fd3511017 Mon Sep 17 00:00:00 2001 From: Frolleks Date: Tue, 22 Mar 2022 14:25:01 +0700 Subject: [PATCH] You see, I'm just learning --- index.html | 21 +++++++++++---------- main.js | 9 +++++++-- 2 files changed, 18 insertions(+), 12 deletions(-) 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')