{
const canvas = html`<div id="canvas" touch-action="none"></div>`;
function draw(where) {
const bbox = canvas.getBoundingClientRect();
canvas.appendChild(
html`<div class="pixel" style="left: ${where.pageX -
bbox.left}px; top: ${where.pageY - bbox.top}px"></div>`
);
}
canvas.addEventListener('pointermove', draw);
invalidation.then(() => canvas.removeEventListener('pointermove', draw));
return canvas;
}