JS interop — DOM, fetch, localStorage from cljrs

The cljrs runtime lives entirely in WASM. The cljrs.js namespace exposes browser primitives — console.log, document.getElementById, addEventListener, localStorage, fetch — as ordinary cljrs builtins. DOM elements round-trip as opaque handles.

Click counter

0

Dad joke (icanhazdadjoke.com)

— click the button —

TODO list (persisted in localStorage)

    loading…

    Edits apply automatically (debounced ~300ms). The cljrs source owns all the wiring: it grabs DOM nodes, attaches listeners, and reads/writes localStorage.

    Builtins