replace __proto__ with Object.setPrototype
This commit is contained in:
parent
2c3cacdc08
commit
4e2f1311e0
10 changed files with 12 additions and 12 deletions
|
@ -66,7 +66,7 @@ const webFrameMethods = [
|
|||
let wrapWebContents = function (webContents) {
|
||||
// webContents is an EventEmitter.
|
||||
var controller, method, name, ref1
|
||||
webContents.__proto__ = EventEmitter.prototype
|
||||
Object.setPrototypeOf(webContents, EventEmitter.prototype)
|
||||
|
||||
// Every remote callback from renderer process would add a listenter to the
|
||||
// render-view-deleted event, so ignore the listenters warning.
|
||||
|
@ -217,7 +217,7 @@ let wrapWebContents = function (webContents) {
|
|||
// Wrapper for native class.
|
||||
let wrapDebugger = function (webContentsDebugger) {
|
||||
// debugger is an EventEmitter.
|
||||
webContentsDebugger.__proto__ = EventEmitter.prototype
|
||||
Object.setPrototypeOf(webContentsDebugger, EventEmitter.prototype)
|
||||
}
|
||||
|
||||
binding._setWrapWebContents(wrapWebContents)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue