mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-26 20:29:33 +00:00
Automatically move inner html in created node when inheriting from HTMLElement
This commit is contained in:
1 parent
301fc73687
commit
517263dd58
4 files changed
+17
-17
No files matched your search
@@ -43,7 +43,11 @@ export function inheritHtmlElement<K extends keyof HTMLElementTagNameMap>(tagNam
|
||||
this.removeAttributeNode(attr);
|
||||
this.node.setAttributeNode(attr);
|
||||
}
|
||||
// Atuomatically add node to DOM if autoAddNode is true or unspecified
|
||||
|
||||
this.node.innerHTML = this.innerHTML;
|
||||
this.innerHTML = "";
|
||||
|
||||
// Automatically add node to DOM if autoAddNode is true or unspecified
|
||||
if (autoAddNode === undefined || autoAddNode) {
|
||||
this.appendChild(this.node);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user