✨ Create DocumentFragment also with el()

This commit is contained in:
jaandrle committed 2023-11-06 14:04:27 +01:00
1 parent 324727cc0a
commit 0d70189908
14 files changed
+24 -27

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ export function createElement(tag, attributes, ...connect){
break;
}
case tag==="#text": el= assign.call(this, document.createTextNode(""), attributes); break;
case tag==="<>": el= assign.call(this, document.createDocumentFragment(), attributes); break;
case tag==="<>" || !tag: el= assign.call(this, document.createDocumentFragment(), attributes); break;
case namespace!=="html": el= assign.call(this, document.createElementNS(namespace, tag), attributes); break;
case !el: el= assign.call(this, document.createElement(tag), attributes);
}