2019-08-23 09:18:58 +00:00
|
|
|
const features = process.electronBinding('features')
|
|
|
|
|
|
|
|
export const moduleList: ElectronInternal.ModuleEntry[] = [
|
|
|
|
{
|
|
|
|
name: 'crashReporter',
|
|
|
|
loader: () => require('@electron/internal/renderer/api/crash-reporter')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'ipcRenderer',
|
|
|
|
loader: () => require('@electron/internal/renderer/api/ipc-renderer')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'nativeImage',
|
|
|
|
loader: () => require('@electron/internal/common/api/native-image')
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'webFrame',
|
|
|
|
loader: () => require('@electron/internal/renderer/api/web-frame')
|
|
|
|
},
|
|
|
|
// The internal modules, invisible unless you know their names.
|
|
|
|
{
|
|
|
|
name: 'deprecate',
|
|
|
|
loader: () => require('@electron/internal/common/api/deprecate'),
|
|
|
|
private: true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
if (features.isDesktopCapturerEnabled()) {
|
|
|
|
moduleList.push({
|
|
|
|
name: 'desktopCapturer',
|
|
|
|
loader: () => require('@electron/internal/renderer/api/desktop-capturer')
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-09-18 16:52:06 +00:00
|
|
|
if (features.isRemoteModuleEnabled() && process.isRemoteModuleEnabled) {
|
2019-08-23 09:18:58 +00:00
|
|
|
moduleList.push({
|
|
|
|
name: 'remote',
|
|
|
|
loader: () => require('@electron/internal/renderer/api/remote')
|
|
|
|
})
|
|
|
|
}
|