Article
Let's have some different text!
This will go into the unnamed slot
This will also go into the unnamed slot
slot
A placeholder inside a web component that users can fill with their own
markup, with the effect of composing different DOM trees together.
template
A mechanism for holding client-side content that is not to be rendered
when a page is loaded but may subsequently be instantiated during runtime
using JavaScript.
Shadow DOM Imperatively with Javascript
I'm not in the shadow DOMShadow DOM Declaratively with HTML
I'm in an open template shadow DOM
I'm in a closed template shadow DOM
Using templates and slots
A more involved example
<NEED NAME >
NEED DESCRIPTION
Attributes
None
Attributes
None
- name
- The name of the slot.