Browse Source

chore: emit the document-start and document-end events in a sandboxed renderer (#20991)

trop[bot] 5 years ago
parent
commit
0a3b0391f4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/sandboxed_renderer/init.js

+ 2 - 0
lib/sandboxed_renderer/init.js

@@ -94,6 +94,8 @@ Object.defineProperty(preloadProcess, 'noDeprecation', {
 
 process.on('loaded', () => preloadProcess.emit('loaded'))
 process.on('exit', () => preloadProcess.emit('exit'))
+process.on('document-start', () => preloadProcess.emit('document-start'))
+process.on('document-end', () => preloadProcess.emit('document-end'))
 
 // This is the `require` function that will be visible to the preload script
 function preloadRequire (module) {