Use spread syntax instead of function apply
This commit is contained in:
parent
f72942bff1
commit
c8ff67ab75
12 changed files with 30 additions and 34 deletions
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue