mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 12:04:57 +01:00
Merge branch 'master' into bwindels/calls-wip
This commit is contained in:
commit
14dbe340c7
@ -285,11 +285,13 @@ export class TemplateBuilder<T extends IObservableValue> {
|
|||||||
|
|
||||||
elNS(ns: string, name: string, attributesOrChildren?: Attributes<T> | Children<T>, children?: Children<T>): ViewNode {
|
elNS(ns: string, name: string, attributesOrChildren?: Attributes<T> | Children<T>, children?: Children<T>): ViewNode {
|
||||||
let attributes: Attributes<T> | undefined;
|
let attributes: Attributes<T> | undefined;
|
||||||
if (attributes !== undefined && isChildren(attributes)) {
|
if (attributesOrChildren) {
|
||||||
children = attributes;
|
if (isChildren(attributesOrChildren)) {
|
||||||
|
children = attributesOrChildren as Children<T>;
|
||||||
} else {
|
} else {
|
||||||
attributes = attributesOrChildren as Attributes<T>;
|
attributes = attributesOrChildren as Attributes<T>;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const node = document.createElementNS(ns, name);
|
const node = document.createElementNS(ns, name);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user