Mercurial > urweb
annotate tests/rs.ur @ 2024:6372a742ab04
Allow '+' char in blessMime
See this one [1] for an example
[1] - http://www.w3.org/TR/SVGTiny12/mimereg.html
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Thu, 05 Jun 2014 20:36:12 +0000 |
parents | 36f7d1debb37 |
children |
rev | line source |
---|---|
adam@1446 | 1 fun bobo () = |
adam@1446 | 2 n1 <- source 0; |
adam@1446 | 3 n2 <- source 1; |
adam@1446 | 4 return <xml> |
adam@1446 | 5 <dyn signal={n1 <- signal n1; n2 <- signal n2; return <xml>{[n1 + n2]}</xml>}/> |
adam@1446 | 6 <button value="Increment1" onclick={v <- get n1; set n1 (v + 1)}/> |
adam@1446 | 7 <button value="Increment2" onclick={v <- get n2; set n2 (v + 1)}/> |
adam@1446 | 8 </xml> |
adam@1446 | 9 |
adam@1446 | 10 fun main () = |
adam@1446 | 11 x <- source <xml/>; |
adam@1446 | 12 return <xml><body> |
adam@1446 | 13 <dyn signal={signal x}/> |
adam@1446 | 14 <button value="Grab" onclick={y <- rpc (bobo ()); set x y}/> |
adam@1446 | 15 </body></xml> |