The type of the root DOM Element.
Defines the exact shape of the idMap.
Creates an instance of TComponent.
The type of the root DOM Element.
Defines the exact shape of the idMap.
The initialization parameters.
ReadonlycontextThe context object for the build process.
ReadonlyelementThe root DOM Element of the component.
OptionalparentThe parent component instance, if any.
Static OptionalnamespaceThe namespace URI of this component's root element.
Static OptionalparseThe options passed when parsing the template.
StatictemplateThe HTML string template for the component.
StaticusesA dictionary of custom components to be used within the template.
Destroys the component. Automatically removes the element from the DOM and cleans up all associated event listeners.
Retrieves an internal element or sub-component by its original template ID. Leverages the IDMap generic for strict type inference.
The original ID defined in the static template.
The element, strongly typed based on the IDMap.
Retrieves an internal element or sub-component by its original template ID, and asserts its type at runtime.
The original ID defined in the static template.
The expected class (e.g., HTMLInputElement, ChildComponent).
The element, strongly typed to the ExpectedType.
Handles errors by delegating them to the parent component, or throws if there is no parent.
The error to be handled.
StaticfromRetrieves the component instance associated with the given DOM element. Only returns the instance if it matches the calling class type.
The root DOM element of the component.
The component instance, or undefined if not found or type mismatch.
StaticgetRetrieves the class-specific parsed templates and their dependent components (uses). If they have not been parsed yet, parses them and caches the results.
The parsed templates and their dependencies.
A practical base component class that automatically parses its template, builds its DOM, binds events, and resolves sub-components.