standardize by hand
This commit is contained in:
parent
cfdfdc8ccc
commit
e6698102c9
13 changed files with 34 additions and 33 deletions
|
@ -5,12 +5,12 @@ const ipcMain = require('electron').ipcMain
|
|||
// The history operation in renderer is redirected to browser.
|
||||
ipcMain.on('ATOM_SHELL_NAVIGATION_CONTROLLER', function (event, method, ...args) {
|
||||
var ref
|
||||
return (ref = event.sender)[method].apply(ref, args)
|
||||
(ref = event.sender)[method].apply(ref, args)
|
||||
})
|
||||
|
||||
ipcMain.on('ATOM_SHELL_SYNC_NAVIGATION_CONTROLLER', function (event, method, ...args) {
|
||||
var ref
|
||||
return event.returnValue = (ref = event.sender)[method].apply(ref, args)
|
||||
event.returnValue = (ref = event.sender)[method].apply(ref, args)
|
||||
})
|
||||
|
||||
// JavaScript implementation of Chromium's NavigationController.
|
||||
|
@ -41,10 +41,10 @@ var NavigationController = (function () {
|
|||
// Go to index.
|
||||
this.currentIndex = this.pendingIndex
|
||||
this.pendingIndex = -1
|
||||
return this.history[this.currentIndex] = url
|
||||
this.history[this.currentIndex] = url
|
||||
} else if (replaceEntry) {
|
||||
// Non-user initialized navigation.
|
||||
return this.history[this.currentIndex] = url
|
||||
this.history[this.currentIndex] = url
|
||||
} else {
|
||||
// Normal navigation. Clear history.
|
||||
this.history = this.history.slice(0, this.currentIndex + 1)
|
||||
|
@ -111,7 +111,7 @@ var NavigationController = (function () {
|
|||
this.history = []
|
||||
this.currentIndex = -1
|
||||
this.pendingIndex = -1
|
||||
return this.inPageIndex = -1
|
||||
this.inPageIndex = -1
|
||||
}
|
||||
|
||||
NavigationController.prototype.goBack = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue