annotate 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
rev   line source
adam@2079 1 fun dn [a] (_ : show a) (x : source a) : xbody = <xml>
adam@2079 2 <dyn signal={v <- signal x; return (txt v)}/>
adam@2079 3 </xml>
adam@2079 4
adam@2079 5 fun main () : transaction page =
adam@2079 6 a <- source "";
adam@2079 7 b <- source True;
adam@2079 8 c <- source "a@b";
adam@2079 9 d <- source "";
adam@2079 10 e <- source "";
adam@2079 11 f <- source "";
adam@2079 12
adam@2079 13 return <xml><body>
adam@2079 14 <ctextbox source={a}/>
adam@2079 15 <ccheckbox source={b}/>
adam@2079 16 <cemail source={c}/>
adam@2079 17 <curl source={d}/>
adam@2079 18 <ctel source={e}/>
adam@2079 19 <csearch source={f}/>
adam@2079 20
adam@2079 21 <hr/>
adam@2079 22
adam@2079 23 {dn a};
adam@2079 24 {dn b};
adam@2079 25 {dn c};
adam@2079 26 {dn d};
adam@2079 27 {dn e};
adam@2079 28 {dn f}
adam@2079 29 </body></xml>