2016-03-25 12:57:17 -07:00
|
|
|
'use strict'
|
2016-01-11 18:40:23 -08:00
|
|
|
|
2016-03-25 12:57:17 -07:00
|
|
|
const EventEmitter = require('events').EventEmitter
|
2016-01-11 18:40:23 -08:00
|
|
|
|
2016-03-25 12:57:17 -07:00
|
|
|
const webFrame = process.atomBinding('web_frame').webFrame
|
2016-01-11 18:40:23 -08:00
|
|
|
|
2016-01-13 12:46:13 +08:00
|
|
|
// webFrame is an EventEmitter.
|
2016-03-28 17:51:11 -07:00
|
|
|
Object.setPrototypeOf(webFrame, EventEmitter.prototype)
|
2016-01-11 18:40:23 -08:00
|
|
|
|
2016-01-13 12:46:13 +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
|