-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
XPath does not report failure for expression ... #38552
Copy link
Copy link
Closed
Labels
Description
Describe the bug:
In other browsers, we would get Uncaught DOMException: Document.evaluate: The expression is not a legal expression. In Servo, we still get current node:
"...",
PhantomData<*const ()>,
)
[2025-08-08T14:04:04Z DEBUG script::xpath] Evaluated XPath: Nodeset([<button id=check>])
To Reproduce:
./mach run -r <following-file> --pref=dom_xpath_enabled
<button id="check">evaluate invalid xpath</button>
<script>
document.getElementById('check').addEventListener('click', () => {
const result3 = document.evaluate("...", document.getElementById("check"), null, null, null).iterateNext();
console.log(result3);
});
</script>Reactions are currently unavailable