{
refresh;
const [w,h] = [width,100];
const ctx = DOM.context2d(w,h);
const {canvas} = ctx;
function draw(text) {
ctx.clearRect(0,0,w,h);
const {fontFamily} = window.getComputedStyle(document.body);
ctx.font = `18px ${fontFamily}`;
ctx.fillText(text,20,h/2);
return canvas;
}
if (workaround) {
yield canvas;
}
yield draw("frame #1");
await Promises.delay(500);
yield draw("frame #2");
}