Use spread syntax instead of function apply

This commit is contained in:
Kevin Sawicki 2016-12-01 14:37:03 -08:00
parent f72942bff1
commit c8ff67ab75
12 changed files with 30 additions and 34 deletions

View file

@ -152,19 +152,19 @@ BrowserWindow.fromDevToolsWebContents = (webContents) => {
// Helpers.
Object.assign(BrowserWindow.prototype, {
loadURL (...args) {
return this.webContents.loadURL.apply(this.webContents, args)
return this.webContents.loadURL(...args)
},
getURL (...args) {
return this.webContents.getURL()
},
reload (...args) {
return this.webContents.reload.apply(this.webContents, args)
return this.webContents.reload(...args)
},
send (...args) {
return this.webContents.send.apply(this.webContents, args)
return this.webContents.send(...args)
},
openDevTools (...args) {
return this.webContents.openDevTools.apply(this.webContents, args)
return this.webContents.openDevTools(...args)
},
closeDevTools () {
return this.webContents.closeDevTools()
@ -179,7 +179,7 @@ Object.assign(BrowserWindow.prototype, {
return this.webContents.toggleDevTools()
},
inspectElement (...args) {
return this.webContents.inspectElement.apply(this.webContents, args)
return this.webContents.inspectElement(...args)
},
inspectServiceWorker () {
return this.webContents.inspectServiceWorker()
@ -188,7 +188,7 @@ Object.assign(BrowserWindow.prototype, {
return this.webContents.showDefinitionForSelection()
},
capturePage (...args) {
return this.webContents.capturePage.apply(this.webContents, args)
return this.webContents.capturePage(...args)
}
})