Mercurial > urweb
comparison tests/setInner.ur @ 1702:06791667937e
New JavaScript FFI function: setInnerHTML
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 14 Mar 2012 10:10:56 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1701:6a4461757829 | 1702:06791667937e |
---|---|
1 fun main () : transaction page = | |
2 x <- fresh; | |
3 s <- source 0; | |
4 q <- source ""; | |
5 return <xml><body> | |
6 <span id={x}/> | |
7 <button onclick={v <- get q; set q (v ^ "!"); Ffi.setIt x <xml><dyn signal={n <- signal s; return <xml>n = {[n]}</xml>}/>{[v]}</xml>}/> | |
8 <button onclick={n <- get s; set s (n + 1)}/> | |
9 </body></xml> |