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

Demix Slottable #9048

Merged
merged 1 commit into from
Feb 11, 2021
Merged

Demix Slottable #9048

merged 1 commit into from
Feb 11, 2021

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Feb 9, 2021

Slottable is a small mixin:

interface mixin Slottable {
  readonly attribute HTMLSlotElement? assignedSlot;
};
Element includes Slottable;
Text includes Slottable;

I think the assignSlot property can be added to Element and Text directly.
Here again we notice how inconsistent things are right now: api/Text.json already has assignedSlot and even MDN docs exist at that place: https://developer.mozilla.org/en-US/docs/Web/API/Text/assignedSlot. So, half of the work is done.

This PR now removes the Slottable.json mixin file and moves the assignedSlot data to Element.json.

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Feb 9, 2021
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is interesting, as I guess it's the first instance we have of the small mixin option in the new guideline.

Feels tidier already. Thank you! 🎉

@ddbeck ddbeck merged commit dbdfcf2 into mdn:master Feb 11, 2021
@Elchi3 Elchi3 deleted the demix-slottable branch February 11, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants