##// END OF EJS Templates
Added priorities to render tasks, revisited rendering scheduler...
Added priorities to render tasks, revisited rendering scheduler nested `watch` and `watchFor` has a lower priority then they enclosing renditions

File last commit:

r112:2ccfaae984e9 v1.4.4 default
r146:af4f8424e83d v1.9.0 default
Show More
DjxFragment.ts
10 lines | 524 B | video/mp2t | TypeScriptLexer
/ djx / src / main / ts / tsx / DjxFragment.ts
import { FunctionRendition } from "./FunctionRendition";
import { getItemDom } from "./render";
/** Special functional component used to create a document fragment */
export const DjxFragment = ({ children }: { children?: unknown | unknown[] }) =>
new FunctionRendition(() => {
const fragment = document.createDocumentFragment();
if (children)
(children instanceof Array ? children : [children]).map(getItemDom).forEach(child => fragment.appendChild(child));
return fragment;
});