Files
ss-tools/specs/prototype-ui.js

3 lines
304 B
JavaScript

function protoState(initial, render){let state=initial;window.setProtoState=(next)=>{state=next;render(state);document.getElementById('proto-state').textContent=next};render(state)}
function wireOpen(){document.querySelectorAll('[data-open]').forEach((el)=>el.onclick=()=>location.hash=el.dataset.open)}