Root
danieldietrich opened this issue · comments
If the web-component has mode="open"
or mode="closed"
then the root
is of type ShadowRoot
.
const { root } = this.ctx;
// = true
root instanceof ShadowRoot
// = false
root === this
If the web-component has no mode set, then the root
is the element.
const { root } = this.ctx;
// = true
root instanceof HTMLElement
// = true
root === this