Say I have a native web component, and it has a slot:
<slot id="CONTENT_SLOT" name="content"></slot>
const CONTENT_SLOT = this.shadowRoot.getElementById("CONTENT_SLOT")
finds the element, but CONTENT_SLOT.children
is empty.
this.shadowRoot.querySelectorAll('[slot="content"]')
returns an empty node list too.
document.querySelectorAll('[slot="content"]')
finds items in the slot, but for all web components.
How can I get a NodeList of the elements in the content
slot for the current web component instance only?