import * as PropertySymbol from '../PropertySymbol.js'; import HTMLElement from '../nodes/html-element/HTMLElement.js'; import Node from '../nodes/node/Node.js'; /** * Custom elements registry. */ export default class CustomElementRegistry { #private; [PropertySymbol.registry]: { [k: string]: { elementClass: typeof HTMLElement; extends: string; }; }; [PropertySymbol.registedClass]: Map; [PropertySymbol.callbacks]: { [k: string]: (() => void)[]; }; /** * Defines a custom element class. * * @param name Tag name of element. * @param elementClass Element class. * @param [options] Options. * @param [options.extends] Extends tag name. */ define(name: string, elementClass: typeof HTMLElement, options?: { extends?: string; }): void; /** * Returns a defined element class. * * @param name Tag name of element. * @returns HTMLElement Class defined or undefined. */ get(name: string): typeof HTMLElement | undefined; /** * Upgrades a custom element directly, even before it is connected to its shadow root. * * Not implemented yet. * * @param _root Root node. */ upgrade(_root: Node): void; /** * When defined. * * @param name Tag name of element. */ whenDefined(name: string): Promise; /** * Reverse lookup searching for name by given element class. * * @param elementClass Class constructor. * @returns Found tag name or `null`. */ getName(elementClass: typeof HTMLElement): string | null; } //# sourceMappingURL=CustomElementRegistry.d.ts.map