Messages from renderer will be emitted to the process object in browser.
This commit is contained in:
parent
66a0abe799
commit
c22d927b6f
3 changed files with 26 additions and 5 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue