зеркало из https://github.com/electron/electron.git
chore: remove unused module (#15917)
This commit is contained in:
Родитель
1672cffe96
Коммит
559fd5cb31
|
@ -1,22 +0,0 @@
|
||||||
'use strict'
|
|
||||||
|
|
||||||
const ipcRenderer = require('@electron/internal/renderer/api/ipc-renderer')
|
|
||||||
|
|
||||||
const v8Util = process.atomBinding('v8_util')
|
|
||||||
const ipcNative = process.atomBinding('ipc')
|
|
||||||
|
|
||||||
// AtomSandboxedRendererClient will look for the "ipcNative" hidden object when
|
|
||||||
// invoking the `onMessage`/`onExit` callbacks. We could reuse "ipc" and assign
|
|
||||||
// `onMessage`/`onExit` directly to `ipcRenderer`, but it is better to separate
|
|
||||||
// private/public APIs.
|
|
||||||
v8Util.setHiddenValue(global, 'ipcNative', ipcNative)
|
|
||||||
|
|
||||||
ipcNative.onMessage = function (channel, args, senderId) {
|
|
||||||
ipcRenderer.emit(channel, { sender: ipcRenderer, senderId }, ...args)
|
|
||||||
}
|
|
||||||
|
|
||||||
ipcNative.onExit = function () {
|
|
||||||
process.emit('exit')
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = ipcRenderer
|
|
Загрузка…
Ссылка в новой задаче