electron/lib/renderer/remote.js
Milan Burda 7a3d220347 refactor: implement Chrome Extension APIs without the remote module (#16686)
* refactor: implement Chrome Extension APIs without the remote module

* remove unused potentiallyRemoteRequire
2019-02-10 10:38:14 -08:00

10 lines
206 B
JavaScript

'use strict'
const { remote } = require('electron')
exports.getRemote = function (name) {
if (!remote) {
throw new Error(`${name} requires remote, which is not enabled`)
}
return remote[name]
}