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