electron/lib/sandboxed_renderer/api/module-list.js
Samuel Attard 54ef906832
[RFC] perf: use an internal module resolver to improve require performance (#14633)
* perf: use an internal module resolver instead of relative requires

* perf: memoize the results of getting exported Electron properties

* perf: make internal module changes consistent across sandboxed / bundled files
2018-09-20 13:43:26 +10:00

34 lines
876 B
JavaScript

const features = process.atomBinding('features')
module.exports = [
{
name: 'crashReporter',
load: () => require('@electron/internal/common/api/crash-reporter')
},
{
name: 'desktopCapturer',
load: () => require('@electron/internal/renderer/api/desktop-capturer'),
enabled: features.isDesktopCapturerEnabled()
},
{
name: 'ipcRenderer',
load: () => require('@electron/internal/sandboxed_renderer/api/ipc-renderer')
},
{
name: 'isPromise',
load: () => require('@electron/internal/common/api/is-promise'),
private: true
},
{
name: 'nativeImage',
load: () => require('@electron/internal/common/api/native-image')
},
{
name: 'remote',
load: () => require('@electron/internal/renderer/api/remote')
},
{
name: 'webFrame',
load: () => require('@electron/internal/renderer/api/web-frame')
}
]