view demo/increment.ur @ 2140:2b0f6b7ebf4f

Add urweb-mode command to close current XML tag Bound to "C-c /" by default to match nxml-mode's nxml-finish-element command.
author Julian Squires <julian@cipht.net>
date Mon, 04 May 2015 16:15:01 -0400
parents e6bc6bbd7a32
children
line wrap: on
line source
sequence seq

fun increment () = nextval seq

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