Mercurial > urweb
annotate tests/rpcNested.ur @ 1924:b44138e6a3bf
Add activeHead tag.
activeHead is similar to active but produces xhead instead of xbody
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Fri, 06 Dec 2013 13:59:39 +0400 |
parents | 133c71008bef |
children |
rev | line source |
---|---|
adam@1546 | 1 datatype node |
adam@1546 | 2 = Node of |
adam@1546 | 3 { Label : string |
adam@1546 | 4 , SubForest : list node |
adam@1546 | 5 } |
adam@1546 | 6 |
adam@1546 | 7 fun getNode () : transaction node = |
adam@1546 | 8 return (Node { Label = "foo", SubForest = [] }) |
adam@1546 | 9 |
adam@1546 | 10 fun main () : transaction page = return <xml><body> |
adam@1546 | 11 <button onclick={ |
adam@1546 | 12 n <- rpc (getNode ()); |
adam@1546 | 13 case n of |
adam@1546 | 14 Node {Label = l, ...} => alert ("l = " ^ l) |
adam@1546 | 15 }/> |
adam@1546 | 16 </body></xml> |