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

Define <slot> #908

Closed
annevk opened this issue Mar 21, 2016 · 4 comments
Closed

Define <slot> #908

annevk opened this issue Mar 21, 2016 · 4 comments
Labels
addition/proposal New features or enhancements topic: shadow Relates to shadow trees (as defined in DOM)

Comments

@annevk
Copy link
Member

annevk commented Mar 21, 2016

There's two parts to this: definition of the element and parsing of the element.

Definition of the element can go in section 4.12 Scripting, since the slot element requires scripting to work, at least at this point. Maybe later with declarative shadow trees it can move to a shadow tree section or some such.

Parsing of the element: WICG/webcomponents#59 proposes it is parsed like the template element.

@rniwa suggests there that slot elements should probably not work in the head element. https://dom.spec.whatwg.org/#dom-element-attachshadow is restricted to elements that can only appear in the body element, but perhaps it's okay for the parser to be more generic? I don't have a strong feeling here.

template elements also reset the form pointer. I'm not sure if that's applicable here. slot elements obviously do not share the bit with template elements where the children get inserted into a different tree.

Also, what is a little problematic is that there's not many people familiar with the HTML parser. @hsivonen @Hixie @abarth, thoughts?

I will try to write a PR of sorts.

Also paging @hayatoito @dglazkov @smaug---- for general Shadow DOM feedback.

@hayatoito
Copy link
Member

Definition of the element can go in section 4.12 Scripting, since the slot element requires scripting to work, at least at this point. Maybe later with declarative shadow trees it can move to a shadow tree section or some such.

Minor point: We can have <slot> without attachShadow. <slot> can live in a node tree which is not a shadow tree. Though it does not make much sense in practical, it can happen.

@scshepard
Copy link

Well, I have never heard of a slot element in HTML5, and a quick look at the pages in W3 show that's not there:https://www.w3.org/TR/html-markup/slot.html
i.e.: 404What is the purpose of this unknown element?

@hayatoito
Copy link
Member

The Shadow DOM spec defines the slot elements.

We are upstreaming Shadow DOM into DOM/HTML Standard.

@annevk
Copy link
Member Author

annevk commented Mar 22, 2016

WIP: b7d3251

TODO:

@domenic domenic added addition/proposal New features or enhancements topic: shadow Relates to shadow trees (as defined in DOM) labels Mar 22, 2016
@annevk annevk closed this as completed in 3c15737 Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements topic: shadow Relates to shadow trees (as defined in DOM)
Development

No branches or pull requests

4 participants