##// END OF EJS Templates
start implementing traits::placeAt
start implementing traits::placeAt

File last commit:

r94:131e369d1143 default
r95:65559e82c81e v1.3
Show More
Renderer.ts
26 lines | 552 B | video/mp2t | TypeScriptLexer
import { Scope } from "./Scope";
import { destroy, Rendition } from "./traits";
let _scope = Scope.dummy;
const beginRender = async () => {
}
const endRender = () => {
}
export const getScope = () => _scope;
export const render = async (rendition: () => Rendition, scope = Scope.dummy) => {
await beginRender();
const prev = _scope;
_scope = scope;
try {
const node = rendition().getDomNode();
scope.own(() => destroy(node));
return node;
} finally {
_scope = prev;
endRender();
}
}