|
|
|
@ -664,7 +664,8 @@ export class HtmlTag {
|
|
|
|
|
|
|
|
|
|
|
|
m(html: string, target: HTMLElement, anchor: HTMLElement = null) {
|
|
|
|
m(html: string, target: HTMLElement, anchor: HTMLElement = null) {
|
|
|
|
if (!this.e) {
|
|
|
|
if (!this.e) {
|
|
|
|
this.e = element(target.nodeName as keyof HTMLElementTagNameMap);
|
|
|
|
/** #7364 target for <template> may be provided as #document-fragment(11) */
|
|
|
|
|
|
|
|
this.e = element((target.nodeType === 11 ? 'TEMPLATE' : target.nodeName) as keyof HTMLElementTagNameMap);
|
|
|
|
this.t = target.tagName !== 'TEMPLATE' ? target : (target as HTMLTemplateElement).content;
|
|
|
|
this.t = target.tagName !== 'TEMPLATE' ? target : (target as HTMLTemplateElement).content;
|
|
|
|
this.c(html);
|
|
|
|
this.c(html);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -674,7 +675,7 @@ export class HtmlTag {
|
|
|
|
|
|
|
|
|
|
|
|
h(html: string) {
|
|
|
|
h(html: string) {
|
|
|
|
this.e.innerHTML = html;
|
|
|
|
this.e.innerHTML = html;
|
|
|
|
this.n = Array.from(this.e.nodeName == 'TEMPLATE' ? (this.e as HTMLTemplateElement).content.childNodes : this.e.childNodes);
|
|
|
|
this.n = Array.from(this.e.nodeName === 'TEMPLATE' ? (this.e as HTMLTemplateElement).content.childNodes : this.e.childNodes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
i(anchor) {
|
|
|
|
i(anchor) {
|
|
|
|
|