added autoclose worker

This commit is contained in:
Nupur Baghel 2018-02-18 23:02:48 +05:30
parent d423e54d58
commit 36991b9d79
5 changed files with 38 additions and 0 deletions

3
tests/html/child.html Normal file
View file

@ -0,0 +1,3 @@
<script>
var w = new Worker('work.js');
</script>

8
tests/html/parent.html Normal file
View file

@ -0,0 +1,8 @@
<body>
<script>
var iframe = document.createElement('iframe');
iframe.src = "child.html";
iframe.onload = function() { iframe.remove(); }
document.body.appendChild(iframe);
</script>
</body>

4
tests/html/work.js Normal file
View file

@ -0,0 +1,4 @@
console.log("reached inside work.js file");
setInterval(function() {
console.log('hi');
}, 500);