2016-03-25 19:57:17 +00:00
|
|
|
'use strict'
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-03-25 19:57:17 +00:00
|
|
|
const EventEmitter = require('events').EventEmitter
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-03-25 19:57:17 +00:00
|
|
|
const webFrame = process.atomBinding('web_frame').webFrame
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-01-13 04:46:13 +00:00
|
|
|
// webFrame is an EventEmitter.
|
2016-03-29 00:51:11 +00:00
|
|
|
Object.setPrototypeOf(webFrame, EventEmitter.prototype)
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-01-13 04:46:13 +00:00
|
|
|
// Lots of webview would subscribe to webFrame's events.
|
2016-03-25 19:57:17 +00:00
|
|
|
webFrame.setMaxListeners(0)
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-03-25 19:57:17 +00:00
|
|
|
module.exports = webFrame
|