summaryrefslogtreecommitdiff
path: root/tests/channel.ur
blob: 6b98f5d7df73b3047e82ce29544c85ae982b9478 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fun main () : transaction page =
    ch <- channel;
    let
        fun onload () =
            subscribe ch;
            send ch "Hello world!"

        fun haveAnother () =
            send ch "Here's another."
    in
        return <xml><body onload={onload ()}>
          <button value="Another?" onclick={haveAnother ()}/>
        </body></xml>
    end