Mercurial > urweb
annotate tests/id.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 | 6f2f74cc4ead |
children |
rev | line source |
---|---|
adam@1703 | 1 fun main () : transaction page = |
adam@1703 | 2 id1 <- fresh; |
adam@1703 | 3 id2 <- fresh; |
adam@1703 | 4 x <- source <xml/>; |
adam@1703 | 5 return <xml><body> |
adam@1703 | 6 <span id={id1}>Hi!</span> |
adam@1703 | 7 <span id={id2}>Ho!</span> |
adam@1703 | 8 <dyn signal={signal x}/> |
adam@1703 | 9 <button value="Set" onclick={id <- fresh; set x <xml><span id={id}>He!</span></xml>}/> |
adam@1703 | 10 <button value="Show" onclick={x <- get x; alert (show x)}/> |
adam@1703 | 11 </body></xml> |