Skip to main content Link Search Menu Expand Document (external link)

CustomElementRegistry overview

Added in v1.0.0


Table of contents


utils

CustomElementConstructor (type alias)

Signature

export type CustomElementConstructor = globalThis.CustomElementConstructor

Added in v1.0.0

CustomElementRegistry

Signature

export declare const CustomElementRegistry: Tagged<CustomElementRegistry, CustomElementRegistry>

Added in v1.0.0

CustomElementRegistry (interface)

Signature

export interface CustomElementRegistry extends globalThis.CustomElementRegistry {}

Added in v1.0.0

ElementDefinitionOptions (type alias)

Signature

export type ElementDefinitionOptions = globalThis.ElementDefinitionOptions

Added in v1.0.0

define

Signature

export declare const define: <K extends keyof HTMLElementTagNameMap>(
  name: K,
  constructor: CustomElementConstructor,
  options?: ElementDefinitionOptions
) => Effect.Effect<void, never, CustomElementRegistry>

Added in v1.0.0

get

Signature

export declare const get: <K extends keyof HTMLElementTagNameMap>(
  name: K
) => Effect.Effect<CustomElementConstructor, NoSuchElementException, CustomElementRegistry>

Added in v1.0.0

upgrade

Signature

export declare const upgrade: (node: Node) => Effect.Effect<void, never, CustomElementRegistry>

Added in v1.0.0

whenDefined

Signature

export declare const whenDefined: <K extends keyof HTMLElementTagNameMap>(
  name: K
) => Effect.Effect<CustomElementConstructor, never, CustomElementRegistry>

Added in v1.0.0