summaryrefslogtreecommitdiff
path: root/tests/id.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-03-16 08:42:51 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-03-16 08:42:51 -0400
commit929cad6c0cf499d4c4bb658d92383734da45794a (patch)
tree3c3cb780abb8c262dab321cbadb323a0cfb66957 /tests/id.ur
parent88e83065e0855559fb32638ac1585827f74eedbe (diff)
Change ID generation scheme to conform to HTML standards (thanks to Edward Yang for the catch)
Diffstat (limited to 'tests/id.ur')
-rw-r--r--tests/id.ur11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/id.ur b/tests/id.ur
new file mode 100644
index 00000000..2178cf4f
--- /dev/null
+++ b/tests/id.ur
@@ -0,0 +1,11 @@
+fun main () : transaction page =
+ id1 <- fresh;
+ id2 <- fresh;
+ x <- source <xml/>;
+ return <xml><body>
+ <span id={id1}>Hi!</span>
+ <span id={id2}>Ho!</span>
+ <dyn signal={signal x}/>
+ <button value="Set" onclick={id <- fresh; set x <xml><span id={id}>He!</span></xml>}/>
+ <button value="Show" onclick={x <- get x; alert (show x)}/>
+ </body></xml>