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

Consider adding a new node type for ShadowRoot #324

Closed
rniwa opened this issue Sep 17, 2015 · 7 comments
Closed

Consider adding a new node type for ShadowRoot #324

rniwa opened this issue Sep 17, 2015 · 7 comments

Comments

@rniwa
Copy link
Collaborator

rniwa commented Sep 17, 2015

We might want to consider adding a new node type like SHADOW_ROOT for ShadowRoot.

@annevk @travisleithead any opinions?

@annevk
Copy link
Collaborator

annevk commented Sep 18, 2015

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.

@domenic
Copy link
Collaborator

domenic commented Sep 18, 2015

It seems weird not to have it... Every node in the DOM should have some type, shouldn't it?

@rniwa
Copy link
Collaborator Author

rniwa commented Sep 18, 2015

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.

@travisleithead
Copy link
Member

Their type today is 11, and name is "#document-fragment", right?

@annevk
Copy link
Collaborator

annevk commented Sep 22, 2015

@travisleithead "today", yeah.

@travisleithead
Copy link
Member

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.

@hayatoito
Copy link
Contributor

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.

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

No branches or pull requests

5 participants