mirror of
https://github.com/electron/electron.git
synced 2026-01-29 09:18:18 -05:00
* refactor: implement Chrome Extension APIs without the remote module * remove unused potentiallyRemoteRequire
11 lines
206 B
JavaScript
11 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]
|
|
}
|