script: Restrict allowed node types for XPath context node (#39751)

See
https://searchfox.org/firefox-main/rev/b30a9b734819436853abf4eba6d768037514b3f6/dom/xslt/xpath/XPathExpression.cpp#115
for the equivalent code in firefox. Chrome also throws the same error.

Testing: This change adds a test
Part of #34527

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker
2025-10-11 10:28:01 +02:00
committed by GitHub
parent a1dd6a2ce0
commit de7e776e28
5 changed files with 58 additions and 0 deletions

View File

@@ -13795,6 +13795,13 @@
{}
]
],
"invalid-xpath-context-nodes.html": [
"b306037d7fa8923af92d60a09c5df77e2937e4f6",
[
null,
{}
]
],
"iterable.html": [
"d4fe1259b01ccef6f1185f5a3d52f8b014a21d51",
[