|
@@ -58,6 +58,10 @@ ipcNative.onMessage = function (channel, args, senderId) {
|
|
|
electron.ipcRenderer.emit(channel, { sender: electron.ipcRenderer, senderId }, ...args)
|
|
|
}
|
|
|
|
|
|
+ipcNative.onLoaded = function () {
|
|
|
+ process.emit('loaded')
|
|
|
+}
|
|
|
+
|
|
|
ipcNative.onExit = function () {
|
|
|
process.emit('exit')
|
|
|
}
|
|
@@ -90,6 +94,7 @@ Object.assign(preloadProcess, processProps)
|
|
|
Object.assign(process, binding.process)
|
|
|
Object.assign(process, processProps)
|
|
|
|
|
|
+process.on('loaded', () => preloadProcess.emit('loaded'))
|
|
|
process.on('exit', () => preloadProcess.emit('exit'))
|
|
|
|
|
|
// This is the `require` function that will be visible to the preload script
|