Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/gauntlet/imports/happy_dom.ts>CustomElementRegistry

Work-in-progress front-end tool which does put a smile on my face
Latest
class CustomElementRegistry
Re-export
import { CustomElementRegistry } from "https://deno.land/x/gauntlet@v0.0.9/imports/happy_dom.ts";

Custom elements registry.

Properties

private
_callbacks
_registry: { [k: string]: { elementClass: HTMLElement; extends: string; }; }

Methods

define(
tagName: string,
elementClass: HTMLElement,
options?: { extends: string; },
): void

Defines a custom element class.

get(tagName: string): HTMLElement

Returns a defined element class.

upgrade(_root: Node): void

Upgrades a custom element directly, even before it is connected to its shadow root.

Not implemented yet.

whenDefined(tagName: string): Promise<void>

When defined.