DjxFragment.ts
6 lines
| 348 B
| video/mp2t
|
TypeScriptLexer
cin
|
r65 | /** Special functional component used to create a document fragment */ | |
cin
|
r79 | export function DjxFragment({ children }: { children?: Node | Node[] }) { | |
cin
|
r65 | const fragment = document.createDocumentFragment(); | |
if (children) | |||
(children instanceof Array ? children : [children]).forEach(child => fragment.appendChild(child)); | |||
return fragment; | |||
} |