electron/lib/renderer/api/web-frame.js
2016-03-30 17:00:33 -07:00

19 lines
667 B
JavaScript

'use strict'
const deprecate = require('electron').deprecate
const EventEmitter = require('events').EventEmitter
const webFrame = process.atomBinding('web_frame').webFrame
// webFrame is an EventEmitter.
Object.setPrototypeOf(webFrame, EventEmitter.prototype)
// Lots of webview would subscribe to webFrame's events.
webFrame.setMaxListeners(0)
// Deprecated.
deprecate.rename(webFrame, 'registerUrlSchemeAsSecure', 'registerURLSchemeAsSecure')
deprecate.rename(webFrame, 'registerUrlSchemeAsBypassingCSP', 'registerURLSchemeAsBypassingCSP')
deprecate.rename(webFrame, 'registerUrlSchemeAsPrivileged', 'registerURLSchemeAsPrivileged')
module.exports = webFrame