Mercurial > urweb
annotate tests/rpcSource.ur @ 1802:e3ec868567ce
Undo change to script evaluation, originally made to support <active> + 'giveFocus'; alternate approach to making 'giveFocus' work in dynamic code generatione
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 03 Aug 2012 08:38:47 -0400 |
parents | 43f22a8f76cc |
children |
rev | line source |
---|---|
adam@1620 | 1 fun remote () = |
adam@1620 | 2 s <- source <xml/>; |
adam@1620 | 3 return (s, <xml><dyn signal={signal s}/></xml>) |
adam@1620 | 4 |
adam@1620 | 5 fun main () : transaction page = |
adam@1620 | 6 x <- source <xml/>; |
adam@1620 | 7 return <xml><body> |
adam@1620 | 8 <dyn signal={signal x}/> |
adam@1620 | 9 <hr/> |
adam@1620 | 10 <button onclick={p <- rpc (remote ()); |
adam@1620 | 11 set x p.2; |
adam@1620 | 12 set p.1 <xml>Hi!</xml>}/> |
adam@1620 | 13 </body></xml> |