-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy the DOM XPath interfaces from the WHATWG wiki #763
Conversation
Tests using this IDL already exist: They show that all of this is already implemented, the failures in Edge and Safari are because of minor differences in |
dom.bs
Outdated
[[DOM-Level-3-XPath]] [[XPath]] These APIs are widely implemented, but | ||
<cite>DOM Level 3 XPath</cite> is no longer maintained. The DOM Standard does not attempt to | ||
define any of the behavior, but the interface definitions are maintained here so that they can | ||
be updated when Web IDL changes. [[WEBIDL]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's more changes than just that, some of them simplify the API by making arguments optional.
Let's also add something, possibly just normative, saying:
XPathException
is gone (just useDOMException
)- The query is matched against the DOM, and therefore contrary to the XPath 1.0 data model the root element has a parent (the Document) and text nodes can be adjacent to one another. [wilful violation]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you want to improve this further or have me do it, but there's two changes I'd like to see here before merging this:
- The first paragraph should be reworded and flagged as an issue (using class=issue), ideally linking to an open issue in the DOM Standard that would allow for someone to take on the work of defining the API in more detail. Sam's points can be included in that issue description. I don't think we should have normative wording outside of the issue.
- The note should probably be reworded a bit to be slightly more formal.
Also, if anyone has issues with merging this, please speak up, as I don't have a good reason to not do this at this point.
I'll polish this up next week. |
I didn't get to this this week and I'm OOO tomorrow. Snoozing it until next week but won't be offended if someone takes it over. |
@annevk I pushed the changes. However, |
@foolip |
@zcorpan thanks, trying that instead |
This is blocked by w3ctag/promises-guide#27 for now. I adjusted the wording a bit to make it clear that defining these is still a goal, albeit perhaps with less priority than some would like. |
c5149de
to
5f1b1e0
Compare
w3ctag/promises-guide#27 is resolved, Travis now happy. |
https://wiki.whatwg.org/wiki/DOM_XPath
Related: #67
Preview | Diff