Mercurial > urweb
annotate tests/rpchan.ur @ 2074:e48e09a1f583
HTML5 input attributes: placeholder, required, autofocus; email input type (without cformTag equivalent)
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Sun, 12 Oct 2014 10:03:36 +0000 |
parents | 3dd041b00087 |
children |
rev | line source |
---|---|
adam@2064 | 1 fun remote () = |
adam@2064 | 2 ch <- channel; |
adam@2064 | 3 send ch "Hello World!"; |
adam@2064 | 4 return ch |
adam@2064 | 5 |
adam@2064 | 6 fun remoter () = |
adam@2064 | 7 ch <- channel; |
adam@2064 | 8 send ch "Hello World!"; |
adam@2064 | 9 return <xml><active code={spawn (s <- recv ch; alert s); return <xml/>}/></xml> |
adam@2064 | 10 |
adam@2064 | 11 fun main () = |
adam@2064 | 12 x <- source <xml/>; |
adam@2064 | 13 return <xml><body> |
adam@2064 | 14 <button onclick={fn _ => ch <- rpc (remote ()); s <- recv ch; alert s}>TEST</button> |
adam@2064 | 15 <button onclick={fn _ => y <- rpc (remoter ()); set x y}>TESTER</button> |
adam@2064 | 16 <hr/> |
adam@2064 | 17 <dyn signal={signal x}/> |
adam@2064 | 18 </body></xml> |