Invalidate iterator over elements of a XPathResult when the document changes (#39411)

Also includes a fix to not throw a type error in
`XPathResult.invalidIteratorState`.

Testing: Includes a new web platform test
Part of https://github.com/servo/servo/issues/34527

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-09-24 18:39:38 +02:00 committed by GitHub
parent 9d7b438d6b
commit 2ccaf86ff6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 162 additions and 39 deletions

View file

@ -21,7 +21,7 @@ interface XPathResult {
[Throws] readonly attribute DOMString stringValue;
[Throws] readonly attribute boolean booleanValue;
[Throws] readonly attribute Node? singleNodeValue;
[Throws] readonly attribute boolean invalidIteratorState;
readonly attribute boolean invalidIteratorState;
[Throws] readonly attribute unsigned long snapshotLength;
[Throws] Node? iterateNext();