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

Allow <slot> to find slottables by slottables's IDs as well #677

Closed
Zhang-Junzhi opened this issue Aug 9, 2018 · 3 comments
Closed

Allow <slot> to find slottables by slottables's IDs as well #677

Zhang-Junzhi opened this issue Aug 9, 2018 · 3 comments
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: shadow Relates to shadow trees (as defined in DOM)

Comments

@Zhang-Junzhi
Copy link

Sometimes, slottables already have IDs, so it's not necessary to require them to also define reduntant slot attributes. If a slot is able to find its slottables by slottables's IDs, we would go a step further to make the document semantically brief(It's semantical brevity which is one principial cause that inspires shadow DOM, isn't it?).

I'd like suggest we add a for attribute to for this.

<slot for="id-for-the-slottable"></slot>
@annevk annevk added the topic: shadow Relates to shadow trees (as defined in DOM) label Aug 10, 2018
@annevk
Copy link
Member

annevk commented Aug 10, 2018

A similar argument was made for element names, and no agreement was reached on that. An API so a library could implement this kind of functionality is likely the first thing implementers will find agreement on.

@annevk annevk added needs implementer interest Moving the issue forward requires implementers to express interest addition/proposal New features or enhancements labels Aug 10, 2018
@annevk
Copy link
Member

annevk commented Oct 25, 2018

Such an API is whatwg/html#3534 btw.

@annevk
Copy link
Member

annevk commented Oct 25, 2018

F2F feedback: implementers don't want this. Per that, I'm closing this. Happy to discuss further if you have concerns though.

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 needs implementer interest Moving the issue forward requires implementers to express interest topic: shadow Relates to shadow trees (as defined in DOM)
Development

No branches or pull requests

2 participants