mirror of
https://github.com/ae-utbm/sith.git
synced 2026-03-27 05:49:42 +00:00
Over engineer ElementOnce web components
This commit is contained in:
@@ -36,6 +36,7 @@ export function registerComponent(name: string, options?: ElementDefinitionOptio
|
||||
**/
|
||||
export function inheritHtmlElement<K extends keyof HTMLElementTagNameMap>(tagName: K) {
|
||||
return class Inherited extends HTMLElement {
|
||||
readonly inheritedTagName = tagName;
|
||||
protected node: HTMLElementTagNameMap[K];
|
||||
|
||||
connectedCallback(autoAddNode?: boolean) {
|
||||
|
||||
Reference in New Issue
Block a user