Skip to content

Note elements which cannot be shadow hosts - #131

Closed
domenic wants to merge 1 commit into
masterfrom
shadowroots
Closed

domenic wants to merge 1 commit into
masterfrom
shadowroots

Conversation

@domenic

@domenic domenic commented Sep 10, 2015

Copy link
Copy Markdown
Member

Fixes #85 by creating a new category of elements which cannot be shadow
hosts, and porting over the list from the shadow DOM specification.

See also WICG/webcomponents#110 (comment).

This is also related to #86, as currently the list corresponds to
elements whose rendering is defined with a binding property, but we
want to remove the binding stuff anyway.

R= @rniwa, @hayatoito.

Plus could use some careful review from other editors to make sure I'm doing this introducing a new category thing right. (It really sucks; I wish it were all auto-generated from one central source.)

Fixes #85 by creating a new category of elements which cannot be shadow
hosts, and porting over the list from the shadow DOM specification.

See also WICG/webcomponents#110 (comment).

This is also related to #86, as currently the list corresponds to
elements whose rendering is defined with a binding property, but we
want to remove the binding stuff anyway.
@hayatoito

Copy link
Copy Markdown
Member

lgtm.
We might want to add more elements to this category. That can be done later as an another commit.

@annevk

annevk commented Sep 11, 2015

Copy link
Copy Markdown
Member

So @rniwa mentioned a bunch of other elements in the Shadow DOM issue and nobody replied. I think it would be good to have that discussion first since we might end up with a different design.

@rniwa

rniwa commented Sep 11, 2015

Copy link
Copy Markdown

Right.

In particular, the behavior of attaching shadow roots on replaced elements such as img, embed, object, etc... are not well defined even though they don't use binding: ~.

summary element also seems to create a user-agent shadow root in Blink and WebKit as well.

In addition, we may want to consider disallowing them on SVG tref and use elements. In fact, we may want to consider allowing attachShadow only on HTMLElement and its subclasses excluding the elements mentioned in this PR as well as the ones I listed above.

@rniwa

rniwa commented Sep 11, 2015

Copy link
Copy Markdown

Since shadow DOM is such a complicated feature with lots of historically controversial topics, I think we're better off being as conservative as possible so that all browsers that decide to implement shadow DOM can interoperate. I'm very afraid that we'll be introducing lots of edge cases to some implementation dependent behaviors otherwise.

@domenic

domenic commented Sep 11, 2015

Copy link
Copy Markdown
Member Author

@rniwa I generally agree with you. Maybe it would be best to let the shadow DOM spec maintain the list of disallowed elements for now, and when there is general agreement we can add it back in to HTML? (Probably at the same time much of the rest of the spec gets incorporated into DOM and HTML.)

@sideshowbarker

Copy link
Copy Markdown
Member

Maybe it would be best to let the shadow DOM spec maintain the list of disallowed elements for now, and when there is general agreement we can add it back in to HTML?

Definitely seems like that would be the less costly and time-consuming option. And as far as tracking it, it’s not like it would ever fall between the cracks or anything. Experience in seeing how other cases have been handled in the past seems to suggest it will just naturally bubble up again as a priority after things are further along implementation-wise.

@domenic

domenic commented Sep 16, 2015

Copy link
Copy Markdown
Member Author

@rniwa, thoughts on #131 (comment) ?

@rniwa

rniwa commented Sep 16, 2015

Copy link
Copy Markdown

That's fine but please keep the issue to move this to HTML spec open. We should merge it into HTML spec once things are more stable.

@domenic

domenic commented Sep 17, 2015

Copy link
Copy Markdown
Member Author

OK. @hayatoito, can you take the action item to:

  1. Update the shadow DOM spec to not reference the "binding" property in its non-normative note, and possibly update the non-normative note to say "we plan to move this to HTML, but development is taking place here for now."
  2. Open a tracking issue on the shadow DOM spec for moving the list to HTML?

Once those tasks are completed we can close this PR, and resurrect it later once shadow DOM begins its integration with DOM and HTML.

@domenic domenic added the do not merge yet Pull request must not be merged per rationale in comment label Sep 17, 2015
@hayatoito

Copy link
Copy Markdown
Member

Sure, let me update the Shadow DOM spec. I'll update this thread once done.

@domenic

domenic commented Feb 24, 2016

Copy link
Copy Markdown
Member Author

It looks like Shadow DOM was indeed updated to no longer reference the binding property. So let's close this. It is just part of the general work to migrate shadow DOM into DOM/HTML.

@domenic domenic closed this Feb 24, 2016
@annevk
annevk deleted the shadowroots branch February 29, 2016 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge yet Pull request must not be merged per rationale in comment

Development

Successfully merging this pull request may close these issues.

5 participants