electron/lib/renderer/api/web-frame.js

13 lines
329 B
JavaScript
Raw Normal View History

2016-03-25 12:57:17 -07:00
'use strict'
2016-01-11 18:40:23 -08:00
2016-08-02 21:02:28 +09:00
const {EventEmitter} = require('events')
const {webFrame, WebFrame} = process.atomBinding('web_frame')
2016-01-11 18:40:23 -08:00
2016-08-02 21:02:28 +09:00
// WebFrame is an EventEmitter.
Object.setPrototypeOf(WebFrame.prototype, EventEmitter.prototype)
2016-01-11 18:40:23 -08:00
// Lots of webview would subscribe to webFrame's events.
2016-03-25 12:57:17 -07:00
webFrame.setMaxListeners(0)
2016-01-11 18:40:23 -08:00
2016-03-25 12:57:17 -07:00
module.exports = webFrame