diff options
author | Adam Chlipala <adam@chlipala.net> | 2014-05-04 12:33:44 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2014-05-04 12:33:44 -0400 |
commit | 2527fe34a9b8d01e2245c5812441a6da2a799ad8 (patch) | |
tree | 3afebbab38c1bef5a1f8774e3032365283ba985e /tests | |
parent | 03769b32eeb1568fdd5cdf5b34a001fe473b931e (diff) |
Fix dynClass for non-<body> contexts
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dynClass.ur | 2 | ||||
-rw-r--r-- | tests/dynList.ur | 22 | ||||
-rw-r--r-- | tests/dynList.urp | 4 | ||||
-rw-r--r-- | tests/dynList.urs | 1 |
4 files changed, 28 insertions, 1 deletions
diff --git a/tests/dynClass.ur b/tests/dynClass.ur index 37f931a2..7cb94d28 100644 --- a/tests/dynClass.ur +++ b/tests/dynClass.ur @@ -15,7 +15,7 @@ fun main () : transaction page = STYLE "width: 500px" else STYLE "width: 200px")} - onclick={b <- get toggle; set toggle (not b)}/> + onclick={fn _ => b <- get toggle; set toggle (not b)}/> <button dynStyle={b <- signal toggle; return (if b then diff --git a/tests/dynList.ur b/tests/dynList.ur new file mode 100644 index 00000000..09b3ee4c --- /dev/null +++ b/tests/dynList.ur @@ -0,0 +1,22 @@ +fun main () = + b <- source True; + let + fun textboxList xs = <xml> + <table> + {List.mapX (fn src => <xml><tr> + <td dynClass={return null} dynStyle={b <- signal b; + if b then + return (STYLE "width: 500px") + else + return (STYLE "width: 100px")}> + <ctextbox source={src}/> + </td></tr></xml>) xs} + </table> + </xml> + in + s <- source "foo"; + return <xml><body> + <ccheckbox source={b}/> + {textboxList (s :: s :: [])} + </body></xml> + end diff --git a/tests/dynList.urp b/tests/dynList.urp new file mode 100644 index 00000000..dc33cb28 --- /dev/null +++ b/tests/dynList.urp @@ -0,0 +1,4 @@ +rewrite all DynList/* + +$/list +dynList diff --git a/tests/dynList.urs b/tests/dynList.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/tests/dynList.urs @@ -0,0 +1 @@ +val main : unit -> transaction page |