this is mainjs
const { app, BrowserWindow } = require('electron')
const path = require('path')
const Store = require('electron-store');
Store.initRenderer();
const createWindow = () => {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
contextIsolation:true,
nodeIntegration:true,
preload: path.join(__dirname, 'preload.js')
}
})
and this is render
const Store = require('electron-store');
const store = new Store();
document.getElementById("btnSave").addEventListener("onClick", Save);
function Save() {
store.set('unicorn', "1");
var BnbBalance = document.getElementById("Balance");
BnbBalance.innerHTML = store.get('unicorn');
}
i do like tutorial but function cant run, but node xxx.js work verywell
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too