Skip to content
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

XPath: Add XPathNSResolver callback interface tests #22384

Conversation

shvaikalesh
Copy link
Member

See also #15105, #18390.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me. Did you file bugs on all failures here or are there no failures for the XPath bits?

@shvaikalesh
Copy link
Member Author

shvaikalesh commented Mar 24, 2020

Firefox implements callback interface properly, but throws SyntaxError instead of NamespaceError (like Safari and Chrome do). I did not manage to find exact error type in the spec though.

Both Safari and Chrome try to call "lookupNamespaceURI" method first, instead of checking if resolver is a function. They also make errors from abrupt completions visible to a developer, but not via "error" event like Firefox does.

Bugs:

@annevk
Copy link
Member

annevk commented Mar 25, 2020

https://dom.spec.whatwg.org/#xpath is all the specification we have at the moment. If you're interested in writing algorithms in English, that could be a fun project to work on.

Appreciate you filing all those bugs by the way!

@annevk annevk merged commit ee44ef0 into web-platform-tests:master Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants