mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Use spread syntax instead of function apply
This commit is contained in:
@@ -45,13 +45,11 @@ class CallbacksRegistry {
|
||||
}
|
||||
|
||||
call (id, ...args) {
|
||||
var ref
|
||||
return (ref = this.get(id)).call.apply(ref, [global].concat(args))
|
||||
return this.get(id).call(global, ...args)
|
||||
}
|
||||
|
||||
apply (id, ...args) {
|
||||
var ref
|
||||
return (ref = this.get(id)).apply.apply(ref, [global].concat(args))
|
||||
return this.get(id).apply(global, ...args)
|
||||
}
|
||||
|
||||
remove (id) {
|
||||
|
||||
Reference in New Issue
Block a user