This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function run_child_process() { | |
console.log('Hello from child'); | |
window.title = 'Child window'; | |
Process.parent.addEventListener('message', (event) => { | |
console.log('[child] Received a message from parent: ' + event); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function resolveAfterTimeout(millis) { | |
return new Promise(function(resolve, reject) { | |
setTimeout(resolve, millis); | |
}); | |
} | |
class ChildProcess { | |
constructor(child, index) { | |
this.child = child; | |
this.index = index; |