mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +00:00
LibWeb: Don't get stuck in TreeWalker.nextNode() when current detached
This fixes a hang on https://reddit.com/ Spec bug: https://github.com/whatwg/dom/issues/1102
This commit is contained in:
parent
f93cab7679
commit
dbca63a1db
3 changed files with 21 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
PASS (Didn't get stuck)
|
|
@ -0,0 +1,13 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const fragment = document.createDocumentFragment();
|
||||
fragment.appendChild(document.createTextNode("hello"));
|
||||
|
||||
const walker = document.createTreeWalker(document, 0);
|
||||
walker.currentNode = fragment;
|
||||
|
||||
walker.nextNode();
|
||||
println("PASS (Didn't get stuck)");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue