Files
electron/lib/sandboxed_renderer/api/exports/electron.js
trop[bot] a313aaea72 feat: security: add an option to disable the remote module (#15222)
Add `webPreferences.enableRemoteModule` option allowing to disable the remote module to increase sandbox security.
2018-10-23 10:35:59 +02:00

22 lines
362 B
JavaScript

'use strict'
const moduleList = require('@electron/internal/sandboxed_renderer/api/module-list')
for (const {
name,
load,
enabled = true,
configurable = false,
private: isPrivate = false
} of moduleList) {
if (!enabled) {
continue
}
Object.defineProperty(exports, name, {
configurable,
enumerable: !isPrivate,
get: load
})
}