comparison tests/doubleDyn.ur @ 1678:d05299e561c8

Fix bug with 'dynClass' immediately inside <dyn>
author Adam Chlipala <adam@chlipala.net>
date Sat, 14 Jan 2012 11:24:17 -0500
parents
children
comparison
equal deleted inserted replaced
1677:3cfc79f92db7 1678:d05299e561c8
1 style linktitle
2 style topic
3
4 fun main () : transaction page =
5 text <- source "Lorem ipsum dolor sit amet";
6 cls <- source linktitle;
7 return <xml>
8 <head>
9 <title>Dynamic CSS class test</title>
10 <link href="http://adam.chlipala.net/style.css" rel="stylesheet" type="text/css" media="all"/>
11 </head>
12 <body>
13 <dyn signal={t <- signal text;
14 return <xml><div dynClass={signal cls}>{[t]}</div></xml>}/>
15 <div dynClass={signal cls}>
16 <dyn signal={t <- signal text; return (txt t)}/>
17 </div>
18 <button value="Style1" onclick={set cls linktitle}/>
19 <button value="Style2" onclick={set cls topic}/>
20 <ctextbox source={text}/>
21 </body>
22 </xml>