diff options
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 |