Created
October 15, 2019 23:52
-
-
Save MarshallOfSound/898c21a51c5f140807433b36b9c9ca09 to your computer and use it in GitHub Desktop.
Electron Fiddle Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Empty --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modules to control application life and create native browser window | |
const {app, BrowserWindow} = require('electron') | |
// Keep a global reference of the window object, if you don't, the window will | |
// be closed automatically when the JavaScript object is garbage collected. | |
let mainWindow | |
function createWindow () { | |
mainWindow = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
webPreferences: { | |
nodeIntegration: false, | |
nativeWindowOpen: true, | |
preload: __dirname + '/renderer.js', | |
additionalArguments: [ | |
'--enable-node-leakage-in-renderers', | |
] | |
} | |
}) | |
mainWindow.loadURL('https://plain-shadow-db76.tails.workers.dev') | |
} | |
app.on('ready', createWindow) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(localStorage) | |
window.addEventListener('load', () => { | |
console.log(localStorage.getItem('f')) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment