Mercurial > urweb
annotate tests/setInner.ur @ 2038:ec2c7a22df0d
Fix off-by-one error in less-safe FFI wrapper generation
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 13 Jul 2014 06:14:23 -0400 |
parents | 06791667937e |
children |
rev | line source |
---|---|
adam@1702 | 1 fun main () : transaction page = |
adam@1702 | 2 x <- fresh; |
adam@1702 | 3 s <- source 0; |
adam@1702 | 4 q <- source ""; |
adam@1702 | 5 return <xml><body> |
adam@1702 | 6 <span id={x}/> |
adam@1702 | 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>}/> |
adam@1702 | 8 <button onclick={n <- get s; set s (n + 1)}/> |
adam@1702 | 9 </body></xml> |