From 68749ea0723e64be29b864e4e48e3c09cdcb90ab Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 28 Nov 2025 13:40:47 +0100 Subject: [PATCH] Address infinite loop in TreeWalker's nextNode() Fixes #1102. --- dom.bs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dom.bs b/dom.bs index 32c0b71c..f120920a 100644 --- a/dom.bs +++ b/dom.bs @@ -10397,18 +10397,23 @@ object walker and "next" or "previous"

Set sibling to temporary's next sibling. -

  • If sibling is non-null, then set node to sibling and - break. +

  • If sibling is non-null, then break.

  • Set temporary to temporary's parent. +

  • If sibling is null, then break. + +

  • Set node to sibling. +

  • Set result to the result of filtering node within this.

  • If result is {{NodeFilter/FILTER_ACCEPT}}, then set this's current to node and return node. + +

  • Return null.