mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Auto merge of #20068 - paavininanda:autocloseworker, r=jdm
added AutoCloseWorker for closing related workers when a page/another worker is closed. <!-- Please describe your changes on the following line: --> Followed steps as suggested in issue. Error is not yet resolved! --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #17977 (https://github.com/servo/servo/issues/17977?). <!-- Either: --> - [x] These changes do not require tests because it will have manual test case. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20068) <!-- Reviewable:end -->
This commit is contained in:
commit
9c484452c0
5 changed files with 38 additions and 0 deletions
3
tests/html/child.html
Normal file
3
tests/html/child.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<script>
|
||||
var w = new Worker('work.js');
|
||||
</script>
|
8
tests/html/parent.html
Normal file
8
tests/html/parent.html
Normal 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
4
tests/html/work.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
console.log("reached inside work.js file");
|
||||
setInterval(function() {
|
||||
console.log('hi');
|
||||
}, 500);
|
Loading…
Add table
Add a link
Reference in a new issue