comparison tests/id.ur @ 1703:6f2f74cc4ead

Change ID generation scheme to conform to HTML standards (thanks to Edward Yang for the catch)
author Adam Chlipala <adam@chlipala.net>
date Fri, 16 Mar 2012 08:42:51 -0400
parents
children
comparison
equal deleted inserted replaced
1702:06791667937e 1703:6f2f74cc4ead
1 fun main () : transaction page =
2 id1 <- fresh;
3 id2 <- fresh;
4 x <- source <xml/>;
5 return <xml><body>
6 <span id={id1}>Hi!</span>
7 <span id={id2}>Ho!</span>
8 <dyn signal={signal x}/>
9 <button value="Set" onclick={id <- fresh; set x <xml><span id={id}>He!</span></xml>}/>
10 <button value="Show" onclick={x <- get x; alert (show x)}/>
11 </body></xml>