comparison tests/channel.ur @ 669:f68eee90dbcf

Press a button to send a message
author Adam Chlipala <adamc@hcoop.net>
date Sun, 22 Mar 2009 15:16:34 -0400
parents b0c1a46b1f15
children f73913d97a40
comparison
equal deleted inserted replaced
668:b0c1a46b1f15 669:f68eee90dbcf
2 ch <- channel; 2 ch <- channel;
3 let 3 let
4 fun onload () = 4 fun onload () =
5 subscribe ch; 5 subscribe ch;
6 send ch "Hello world!" 6 send ch "Hello world!"
7
8 fun haveAnother () =
9 send ch "Here's another."
7 in 10 in
8 return <xml><body onload={onload ()}> 11 return <xml><body onload={onload ()}>
9 12 <button value="Another?" onclick={haveAnother ()}/>
10 </body></xml> 13 </body></xml>
11 end 14 end