-
Notifications
You must be signed in to change notification settings - Fork 30
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
Throw InvalidNodeTypeError on DocumentType nodes #118
Comments
Do all major browsers currently throw InvalidNodeTypeError? |
Chrome, Firefox, and Edge do; Safari might not. https://wpt.fyi/results/selection/selectAllChildren.html?label=experimental&label=master&aligned has many cases involving a doctype. |
The specification already requires throwing |
Regarding the ordering of the checks, see also my comments in #124. |
Just looked at the WPT test and unfortunately it makes does the |
This matches how major engines behave and is covered by multiple tests in WPT already. Closes w3c#118.
This matches how major engines behave and is covered by multiple tests in WPT already. Closes #118.
Various methods that take a node and offset are specified as throwing IndexSizeError if the offset exceeds the node's length.
By WPT tests and by analogy with Range methods, these also need to throw InvalidNodeTypeError if the node is a DocumentType, and InvalidNodeType is the condition to check first for cases where both apply.
The text was updated successfully, but these errors were encountered: