Messages from renderer will be emitted to the process object in browser.

This commit is contained in:
Cheng Zhao 2013-04-22 22:24:02 +08:00
parent 66a0abe799
commit c22d927b6f
3 changed files with 26 additions and 5 deletions

View file

@ -3,12 +3,14 @@ var Window = require('window');
var mainWindow = null;
process.on('message', function() {
console.log.apply(this, arguments);
});
atom.browserMainParts.preMainMessageLoopRun = function() {
mainWindow = new Window({ width: 800, height: 600 });
mainWindow.url = 'file://' + __dirname + '/index.html';
console.log(mainWindow.id);
mainWindow.on('page-title-updated', function(event, title) {
event.preventDefault();