Fix lint errors of using __proto__
This commit is contained in:
parent
edb573d69e
commit
8c0a033b6f
3 changed files with 10 additions and 8 deletions
|
@ -1,11 +1,10 @@
|
|||
'use strict'
|
||||
|
||||
const EventEmitter = require('events').EventEmitter
|
||||
const {EventEmitter} = require('events')
|
||||
const {webFrame, WebFrame} = process.atomBinding('web_frame')
|
||||
|
||||
const webFrame = process.atomBinding('web_frame').webFrame
|
||||
|
||||
// webFrame is an EventEmitter.
|
||||
Object.setPrototypeOf(webFrame.__proto__, EventEmitter.prototype)
|
||||
// WebFrame is an EventEmitter.
|
||||
Object.setPrototypeOf(WebFrame.prototype, EventEmitter.prototype)
|
||||
|
||||
// Lots of webview would subscribe to webFrame's events.
|
||||
webFrame.setMaxListeners(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue