comparison tests/dynList.ur @ 2012:2b2d07946e65

Fix dynClass for non-<body> contexts
author Adam Chlipala <adam@chlipala.net>
date Sun, 04 May 2014 12:33:44 -0400
parents
children
comparison
equal deleted inserted replaced
2011:cfd604842006 2012:2b2d07946e65
1 fun main () =
2 b <- source True;
3 let
4 fun textboxList xs = <xml>
5 <table>
6 {List.mapX (fn src => <xml><tr>
7 <td dynClass={return null} dynStyle={b <- signal b;
8 if b then
9 return (STYLE "width: 500px")
10 else
11 return (STYLE "width: 100px")}>
12 <ctextbox source={src}/>
13 </td></tr></xml>) xs}
14 </table>
15 </xml>
16 in
17 s <- source "foo";
18 return <xml><body>
19 <ccheckbox source={b}/>
20 {textboxList (s :: s :: [])}
21 </body></xml>
22 end