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

Editorial: note that CDATASections are Texts inside switches #636

Closed
domenic opened this issue Apr 16, 2018 · 3 comments
Closed

Editorial: note that CDATASections are Texts inside switches #636

domenic opened this issue Apr 16, 2018 · 3 comments

Comments

@domenic
Copy link
Member

domenic commented Apr 16, 2018

I made a mistake and thought CDATASection was "Any other node", but actually it's a Text node. So in switches like textContent and nodeValue, I'd suggest changing "Text" to "Text (including CDATASection)"

Thoughts?

@annevk
Copy link
Member

annevk commented Apr 16, 2018

See #597. Note that if we did this, how should we handle Element, which has many subclasses? I guess they're not different node types, but it does seem somewhat inconsistent in a way.

@domenic
Copy link
Member Author

domenic commented Apr 16, 2018

Right, the mistake I made was switching on node type, which is probably easier than switching on inherited-from-ness in most implementations.

And yeah, no web platform tests seemed to catch this either.

@annevk
Copy link
Member

annevk commented Apr 16, 2018

Maybe that's a good solution in the absence of [[PlatformBrand]]. Make "type" an internal slot of nodes and branch on that everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants