-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Enable XPath by default #34527
Copy link
Copy link
Labels
A-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentB-feature-trackingThis issue tracks a particular high-level featureThis issue tracks a particular high-level feature
Description
The DOM interface is gated behind dom_xpath_enabled, which is disabled by default.
Links
The DOM XPath spec is kind of a mess, here are some links I dug up:
- Original, retired spec: https://www.w3.org/TR/DOM-Level-3-XPath/
- "Living spec": https://dom.spec.whatwg.org/#xpath
- Some points about what's unspecified from the whatwg wiki: https://wiki.whatwg.org/wiki/DOM_XPath
- Some points about how XPath in HTML documents works differently: https://html.spec.whatwg.org/multipage/infrastructure.html#interactions-with-xpath-and-xslt
TODO
- XPath: implement lang() and id() core functions #34593
- Invalidating an
XPathResult(of the typeUNORDERED_NODE_ITERATOR_TYPEorORDERED_NODE_ITERATOR_TYPE) if the DOM has mutated (Invalidate iterator over elements of a XPathResult when the document changes #39411) - Allowing an
XPathResultto be mutated by a new XPath query evaluation (i.e.evaluate("foo", ..., old_result_to_be_mutated)rather thanlet new_result = evaluate("foo", ...) - Better test coverage in general
Test coverage
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-content/domInteracting with the DOM from web contentInteracting with the DOM from web contentB-feature-trackingThis issue tracks a particular high-level featureThis issue tracks a particular high-level feature