mirror of
https://github.com/jaandrle/deka-dom-el
synced 2026-10-24 17:51:48 +02:00
✨ Create DocumentFragment also with el()
This commit is contained in:
14 files changed
+24
-27
No files matched your search
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user