-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Consider the example from the documentation:
<x-panel>
<!-- Named Slot -->
<template slot="header">
<h1>Panel Header</h1>
</template>
<!-- Default Slot -->
<template>
<p>Panel Content</p>
</template>
</x-panel>
This could be more concisely expressed as:
<x-panel>
<!-- Named Slot -->
<h1 slot="header">Panel Header</h1>
<!-- Default Slot -->
<p>Panel Content</p>
</x-panel>
The Spec says:
Note: An unnamed
<slot>will be filled with all of the custom element's top-level child nodes that do not have the slot attribute. This includes text nodes.
So this should probably work too:
<x-panel>
<!-- Named Slot -->
<h1 slot="header">Panel Header</h1>
<!-- Default Slot -->
<p>Panel Content</p>
<p> some more content </p>
</x-panel>
Metadata
Metadata
Assignees
Labels
No labels