Last active
June 7, 2016 05:23
-
-
Save bnookala/818785874346f7b6775df4fcc1d4cd5c to your computer and use it in GitHub Desktop.
Electron Focus
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
<html> | |
<head></head> | |
<body> | |
this is an input in index.html:<br/> | |
<input></input> | |
<br/> | |
<webview src="webview.html" disablewebsecurity allowpopups></webview> | |
</body> | |
</html> |
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
const electron = require('electron'); | |
const app = electron.app; | |
const BrowserWindow = electron.BrowserWindow; | |
const appLocation = `file://${__dirname}/index.html` | |
let mainWindow = undefined; | |
app.on('ready', () => { | |
mainWindow = new BrowserWindow(); | |
mainWindow.loadURL(appLocation); | |
}); | |
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
<html> | |
<head></head> | |
<body> | |
This is an input box in webview.html: | |
<br/> | |
<input></input> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment