Closed Bug 1339853 Opened 4 years ago Closed 3 years ago
Expression/XPath Evaluator arguments optional
In landing tests for DOM XPath's IDL in web-platform-tests, I came across disagreement cross-browser about whether the majority of arguments in the XPath DOM API are optional or not. These tests are now in domxpath/interfaces.html. Blink gets away (and has, as far as can I tell, since WebKit days) with making most of them optional, and this makes the API far easier to use. As such, https://wiki.whatwg.org/wiki/DOM_XPath now lists many of these as optional. It would be good for Gecko to align here. WebKit, FWIW, makes them *all* optional, which makes no sense whatsoever as who wants "undefined" as a XPath expression and null as a context node.
I recently filed https://bugs.chromium.org/p/chromium/issues/detail?id=690608 about the fact that Blink doesn't match the spec and there is no modern spec. Lots of arguments on lots of methods are optional in Blink and WebKit due to, it seems, bindings historically being maximally permissive. If there are arguments around XPath that make no sense to leave as optional, maybe we can fix that without waiting for a spec to come around.
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Attachment #8914765 - Flags: review?(bzbarsky)
Comment on attachment 8914765 [details] [diff] [review] v1 r=me, but I filed https://github.com/w3c/web-platform-tests/issues/7562 on the fact that this shouldn't be a WPT (or should be clearly labeled as testing non-standardized bits).
Attachment #8914765 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/b668425e2914ffbecaa216dc0833bab3ba0ddd58 Bug 1339853 - Make XPathExpression/XPathEvaluator arguments optional. r=bz.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/b668425e2914 Make XPathExpression/XPathEvaluator arguments optional. r=bz.
You need to log in before you can comment on or make changes to this bug.