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

"If node is a Text node" #719

Closed
domenic opened this issue Dec 2, 2018 · 3 comments
Closed

"If node is a Text node" #719

domenic opened this issue Dec 2, 2018 · 3 comments
Labels
clarification Standard could be clearer

Comments

@domenic
Copy link
Member

domenic commented Dec 2, 2018

https://dom.spec.whatwg.org/commit-snapshots/23ec6421f47ab629bd14dfc6d4910414dc443d0b/#mutation-algorithms

If node is a Text node, ...

Apparently, per tests and browser behavior, this includes both Text and CDATASection nodes. While I might say that both are "text nodes", the current spec's typography of "Text node" is a bit misleading, implying it would not include CDATA section nodes.

I'd like to suggest that the spec try to be as clear as possible and use either "text node" or (better) "inclusive text node" when referring to both Text and CDATASection nodes.

Via jsdom/jsdom#2441, where @Zirro remarks that we might not have test coverage for very many other places in the spec that have this problem.

@annevk
Copy link
Member

annevk commented Dec 3, 2018

See #636 and in particular #597.

I really want [[PlatformBrand]] in IDL before trying to fix this.

@domenic
Copy link
Member Author

domenic commented Dec 3, 2018

I would really rather not block on that, especially since I consider it a dubious and over-formal solution. We don't need all that machinery just to change "Text node" to "Text or CDATASection node" or similar.

@annevk
Copy link
Member

annevk commented Dec 4, 2018

Yes we do. How would you handle the equivalent Element case for instance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

No branches or pull requests

2 participants