2016-01-13 04:46:13 +00:00
|
|
|
'use strict';
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-01-13 04:46:13 +00:00
|
|
|
const deprecate = require('electron').deprecate;
|
|
|
|
const EventEmitter = require('events').EventEmitter;
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-01-13 04:46:13 +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.
|
|
|
|
webFrame.__proto__ = 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.
|
|
|
|
webFrame.setMaxListeners(0);
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2016-01-13 04:46:13 +00:00
|
|
|
// Deprecated.
|
2016-01-12 02:40:23 +00:00
|
|
|
deprecate.rename(webFrame, 'registerUrlSchemeAsSecure', 'registerURLSchemeAsSecure');
|
|
|
|
deprecate.rename(webFrame, 'registerUrlSchemeAsBypassingCSP', 'registerURLSchemeAsBypassingCSP');
|
|
|
|
deprecate.rename(webFrame, 'registerUrlSchemeAsPrivileged', 'registerURLSchemeAsPrivileged');
|
|
|
|
|
|
|
|
module.exports = webFrame;
|