Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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,
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,
options?: boolean | EventListenerOptions,
): void;
}
var ShadowRoot: {
prototype: ShadowRoot;
new (): ShadowRoot;
}
;

§Extends

§Properties

§
readonly delegatesFocus: boolean
[src]
§
readonly host: Element
[src]
§
readonly mode: ShadowRootMode
[src]
§
onslotchange: ((this: ShadowRoot, ev: Event) => any) | null
[src]
§
readonly slotAssignment: SlotAssignmentMode
[src]

§Methods

§
addEventListener<K extends keyof ShadowRootEventMap>(
type: K,
listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]

Throws a "NotSupportedError" DOMException if context object is a shadow root.

§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
removeEventListener<K extends keyof ShadowRootEventMap>(
type: K,
listener: (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]