Chromium
XULrunner since Sept. 2006
Boxely since 2007
InternetExplorer before 2007
The nice thing about standards is
that you have so many to choose from.
Andrew S. Tanenbaum – Computer Networks, 2nd ed., p. 254
since 2012
since 2011
since 2008
since 2006
since 2012
since 2014
npm init
npm install --save-dev electron-prebuilt
{
...
"scripts": {
"start": "electron ."
}
}
var app = require("app");
var BrowserWindow = require("browser-window");
var mainWindow = null;
app.on('ready', function() {
// with node-integration jQuery wont assign itself to window
mainWindow = new BrowserWindow({"node-integration": false});
mainWindow.loadUrl("https://news.ycombinator.com/news");
// mainWindow.openDevTools({"detach": true}) // debug, uh?
});
npm init
npm install --save-dev electron-prebuilt
{
...
"scripts": {
"start": "electron ."
}
}
var app = require("app");
var BrowserWindow = require("browser-window");
var mainWindow = null;
app.on('ready', function() {
// with node-integration jQuery wont assign itself to window
mainWindow = new BrowserWindow({"node-integration": false});
mainWindow.loadUrl('file://' + app.getAppPath() + '/index.html');
});
<!DOCTYPE html>
<button>Point Less</button>
<script>
(function() {
var remote = require('remote');
var app = remote.require('app');
var button = document.getElementsByTagName("button")[0];
button.addEventListener('click', function() {
console.log("point less");
app.quit();
});
})();
</script>
npm install --save-dev electron-packager
// package.json
{
…
"scripts": {
"build": "electron-packager . Example --platform=darwin --arch=x64 --version=0.32.0"
…
}