feat: emit process 'loaded' event in sandboxed renderers (#17680)
This commit is contained in:
parent
127b87c713
commit
77d59e99b6
4 changed files with 25 additions and 4 deletions
|
@ -56,6 +56,9 @@ v8Util.setHiddenValue(global, 'ipcNative', {
|
|||
|
||||
// AtomSandboxedRendererClient will look for the "lifecycle" hidden object when
|
||||
v8Util.setHiddenValue(global, 'lifecycle', {
|
||||
onLoaded () {
|
||||
process.emit('loaded')
|
||||
},
|
||||
onExit () {
|
||||
process.emit('exit')
|
||||
},
|
||||
|
@ -89,6 +92,7 @@ Object.defineProperty(preloadProcess, 'noDeprecation', {
|
|||
}
|
||||
})
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue