diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-12-27 16:20:48 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-12-27 16:20:48 -0500 |
commit | cbc7945fff250fe24dc91bcaa3fec2d635dc052a (patch) | |
tree | b79292fd3c487498c7837ad6008636a1ed5163cf /tests | |
parent | a8b2771f6e2526855ae3387b876d7f861b53c817 (diff) |
'dynClass' pseudo-attribute
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dynClass.ur | 21 | ||||
-rw-r--r-- | tests/dynClass.urp | 4 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/dynClass.ur b/tests/dynClass.ur new file mode 100644 index 00000000..2c7068c8 --- /dev/null +++ b/tests/dynClass.ur @@ -0,0 +1,21 @@ +style s1 +style s2 + +fun main () : transaction page = + src <- source s1; + s <- source ""; + toggle <- source False; + return <xml> + <head> + <link rel="stylesheet" type="text/css" href="http://localhost/test.css"/> + </head> + <body> + <button dynClass={signal src} onclick={set src s2}/> + + <hr/> + + <ctextbox source={s} dynClass={t <- signal toggle; + return (if t then s1 else s2)} + onkeyup={fn _ => t <- get toggle; set toggle (not t)}/> + </body> + </xml> diff --git a/tests/dynClass.urp b/tests/dynClass.urp new file mode 100644 index 00000000..4358782b --- /dev/null +++ b/tests/dynClass.urp @@ -0,0 +1,4 @@ +rewrite all DynClass/* +allow url http://localhost/* + +dynClass |