Mercurial > urweb
diff tests/html5_cforms.ur @ 2079:e1879ded8095
Textual HTML5 AJAX widgets
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 16 Nov 2014 15:03:29 -0500 |
parents | |
children | f05fcb206571 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/html5_cforms.ur Sun Nov 16 15:03:29 2014 -0500 @@ -0,0 +1,29 @@ +fun dn [a] (_ : show a) (x : source a) : xbody = <xml> + <dyn signal={v <- signal x; return (txt v)}/> +</xml> + +fun main () : transaction page = + a <- source ""; + b <- source True; + c <- source "a@b"; + d <- source ""; + e <- source ""; + f <- source ""; + + return <xml><body> + <ctextbox source={a}/> + <ccheckbox source={b}/> + <cemail source={c}/> + <curl source={d}/> + <ctel source={e}/> + <csearch source={f}/> + + <hr/> + + {dn a}; + {dn b}; + {dn c}; + {dn d}; + {dn e}; + {dn f} + </body></xml>