summaryrefslogtreecommitdiff
path: root/demo/increment.ur
blob: 36b8191fa9f38442fe652f5e5409378b77adedea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
sequence seq

fun increment () = nextval seq

fun action () =
    src <- source 0;
    return <xml><body>
      <dyn signal={n <- signal src; return <xml>{[n]}</xml>}/>
      <button value="Update" onclick={n <- increment (); set src n}/>
    </body></xml>

fun main () = return <xml><body>
  <form><submit value="Begin demo" action={action}/></form>
</body></xml>