Remove returns from event handlers
This commit is contained in:
parent
0ee3446109
commit
3c11f5dc4d
1 changed files with 11 additions and 11 deletions
|
@ -69,29 +69,29 @@ BrowserWindow.prototype._init = function() {
|
||||||
// Though this hack is only needed on OS X when the app is launched from
|
// Though this hack is only needed on OS X when the app is launched from
|
||||||
// Finder, we still do it on all platforms in case of other bugs we don't know.
|
// Finder, we still do it on all platforms in case of other bugs we don't know.
|
||||||
this.webContents.once('load-url', function() {
|
this.webContents.once('load-url', function() {
|
||||||
return this.focus();
|
this.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Redirect focus/blur event to app instance too.
|
// Redirect focus/blur event to app instance too.
|
||||||
this.on('blur', (event) => {
|
this.on('blur', (event) => {
|
||||||
return app.emit('browser-window-blur', event, this);
|
app.emit('browser-window-blur', event, this);
|
||||||
});
|
});
|
||||||
this.on('focus', (event) => {
|
this.on('focus', (event) => {
|
||||||
return app.emit('browser-window-focus', event, this);
|
app.emit('browser-window-focus', event, this);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Evented visibilityState changes
|
// Evented visibilityState changes
|
||||||
this.on('show', () => {
|
this.on('show', () => {
|
||||||
return this.webContents.send('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', this.isVisible(), this.isMinimized());
|
this.webContents.send('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', this.isVisible(), this.isMinimized());
|
||||||
});
|
});
|
||||||
this.on('hide', () => {
|
this.on('hide', () => {
|
||||||
return this.webContents.send('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', this.isVisible(), this.isMinimized());
|
this.webContents.send('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', this.isVisible(), this.isMinimized());
|
||||||
});
|
});
|
||||||
this.on('minimize', () => {
|
this.on('minimize', () => {
|
||||||
return this.webContents.send('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', this.isVisible(), this.isMinimized());
|
this.webContents.send('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', this.isVisible(), this.isMinimized());
|
||||||
});
|
});
|
||||||
this.on('restore', () => {
|
this.on('restore', () => {
|
||||||
return this.webContents.send('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', this.isVisible(), this.isMinimized());
|
this.webContents.send('ATOM_RENDERER_WINDOW_VISIBILITY_CHANGE', this.isVisible(), this.isMinimized());
|
||||||
});
|
});
|
||||||
|
|
||||||
// Notify the creation of the window.
|
// Notify the creation of the window.
|
||||||
|
@ -99,15 +99,15 @@ BrowserWindow.prototype._init = function() {
|
||||||
|
|
||||||
// Be compatible with old APIs.
|
// Be compatible with old APIs.
|
||||||
this.webContents.on('devtools-focused', () => {
|
this.webContents.on('devtools-focused', () => {
|
||||||
return this.emit('devtools-focused');
|
this.emit('devtools-focused');
|
||||||
});
|
});
|
||||||
this.webContents.on('devtools-opened', () => {
|
this.webContents.on('devtools-opened', () => {
|
||||||
return this.emit('devtools-opened');
|
this.emit('devtools-opened');
|
||||||
});
|
});
|
||||||
this.webContents.on('devtools-closed', () => {
|
this.webContents.on('devtools-closed', () => {
|
||||||
return this.emit('devtools-closed');
|
this.emit('devtools-closed');
|
||||||
});
|
});
|
||||||
return Object.defineProperty(this, 'devToolsWebContents', {
|
Object.defineProperty(this, 'devToolsWebContents', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
configurable: false,
|
configurable: false,
|
||||||
get: function() {
|
get: function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue