ShadowRoot
interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML {
readonly delegatesFocus: boolean;
readonly host: Element;
readonly mode: ShadowRootMode;
onslotchange: ((this: ShadowRoot, ev: Event) => any) | null;
readonly slotAssignment: SlotAssignmentMode;
addEventListener<K extends keyof ShadowRootEventMap>(
type: K,
listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;removeEventListener<K extends keyof ShadowRootEventMap>(
type: K,
listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
}type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;var ShadowRoot: {
prototype: ShadowRoot;
new (): ShadowRoot;
};§Properties
§
readonly mode: ShadowRootMode
[src]§
onslotchange: ((this: ShadowRoot, ev: Event) => any) | null
[src]§
readonly slotAssignment: SlotAssignmentMode
[src]§Methods
§
addEventListener<K extends keyof ShadowRootEventMap>(
[src]type: K,
listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): voidThrows a "NotSupportedError" DOMException if context object is a shadow root.
§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
removeEventListener<K extends keyof ShadowRootEventMap>(
[src]type: K,
listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void