electron/lib/renderer/api/exports/electron.js

24 lines
518 B
JavaScript
Raw Normal View History

'use strict'
const common = require('@electron/internal/common/api/exports/electron')
const moduleList = require('@electron/internal/renderer/api/module-list')
2016-01-12 02:40:23 +00:00
2016-01-14 18:35:29 +00:00
// Import common modules.
2016-03-25 19:57:17 +00:00
common.defineProperties(exports)
2016-01-12 02:40:23 +00:00
for (const {
2018-09-13 16:10:51 +00:00
name,
file,
enabled = true,
private: isPrivate = false
} of moduleList) {
if (!enabled) {
continue
}
Object.defineProperty(exports, name, {
enumerable: !isPrivate,
get: common.memoizedGetter(() => require(`@electron/internal/renderer/api/${file}`))
})
}