diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-01-14 11:24:17 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-01-14 11:24:17 -0500 |
commit | f2b84bc39038d11eed7a82da0ddb875fa48839a4 (patch) | |
tree | cb4f73a03b8d1d1eb97c8cab4742b4bed0f1e3e3 /tests | |
parent | a3f5a3a95ee01e9d27933ca5c1c755ceb9dac1af (diff) |
Fix bug with 'dynClass' immediately inside <dyn>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/doubleDyn.ur | 22 | ||||
-rw-r--r-- | tests/doubleDyn.urp | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/doubleDyn.ur b/tests/doubleDyn.ur new file mode 100644 index 00000000..97cf57d8 --- /dev/null +++ b/tests/doubleDyn.ur @@ -0,0 +1,22 @@ +style linktitle +style topic + +fun main () : transaction page = + text <- source "Lorem ipsum dolor sit amet"; + cls <- source linktitle; + return <xml> + <head> + <title>Dynamic CSS class test</title> + <link href="http://adam.chlipala.net/style.css" rel="stylesheet" type="text/css" media="all"/> + </head> + <body> + <dyn signal={t <- signal text; + return <xml><div dynClass={signal cls}>{[t]}</div></xml>}/> + <div dynClass={signal cls}> + <dyn signal={t <- signal text; return (txt t)}/> + </div> + <button value="Style1" onclick={set cls linktitle}/> + <button value="Style2" onclick={set cls topic}/> + <ctextbox source={text}/> + </body> + </xml> diff --git a/tests/doubleDyn.urp b/tests/doubleDyn.urp new file mode 100644 index 00000000..70522905 --- /dev/null +++ b/tests/doubleDyn.urp @@ -0,0 +1,4 @@ +allow url http://adam.chlipala.net/style.css +rewrite all DoubleDyn/* + +doubleDyn |