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
Consider adding a new node type for ShadowRoot #324
Comments
I think the only reason we had node types to begin with was Java. And perhaps it's useful for cross-global object instanceof-type things. Not particularly convinced it's worth it. |
It seems weird not to have it... Every node in the DOM should have some type, shouldn't it? |
I get that these type enums are legacy but not having one for shadow root will make the DOM API even less consistent and imposes unwarranted cognitive load on authors. |
Their type today is 11, and name is "#document-fragment", right? |
@travisleithead "today", yeah. |
I see the argument for consistency with other DOM node types, but given that these tend to act more like document roots and are not ever going to be seen while traversing a node tree (where most code checks for nodeType/Name), then there doesn't seem a lot of value to adding the new type. So, I don't have strong feelings either way, but I'm leaning towards not adding one. |
I don't have a strong opinion either. I'll close this issue in a week if we don't have more +1 for adding new node type. We can reopen this issue anytime. |
We might want to consider adding a new node type like
SHADOW_ROOT
forShadowRoot
.@annevk @travisleithead any opinions?
The text was updated successfully, but these errors were encountered: