This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Repository navigation
0.0.36
Added:
- Post-processing: get raw element ref with id properties and callbacks.
function Canvas() {
const colorSwitch = $(true);
return html`
<canvas ${{ id: "color", [on.click]: () => colorSwitch.switch() }}></canvas>
`.then(({ color }) => {
const ctx = color.getContext("2d");
colorSwitch.into($ => $ ? "red" : "blue").watch($ => {
ctx.fillStyle = $;
ctx.fillRect(0, 0, 100, 100);
});
})
}