Baseline Widely available
The host
read-only property of the ShadowRoot
returns a reference to the DOM element the ShadowRoot
is attached to.
A DOM Element
.
const customElem = document.querySelector("my-shadow-dom-element");
const shadow = customElem.shadowRoot;
// â¦
// return the original host element some time later
const hostElem = shadow.host;
Specifications Browser compatibility See also
part
and exportparts
HTML attributes<template>
and <slot>
HTML elements:host
, :host()
, and :host-context()
CSS pseudo-classes::part
and ::slotted
CSS pseudo-elementsRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3