diff options
author | 2011-09-03 12:51:05 -0400 | |
---|---|---|
committer | 2011-09-03 12:51:05 -0400 | |
commit | cd28ea2ee01ac023b7b1dfac39ae5ddf4ded5c4e (patch) | |
tree | d792d445b5fbc6b0a16eadef95d70510f9037dd6 /tests/nextid.ur | |
parent | 3c860c3c95d4d085499fd01e3140f32aafbc1bd7 (diff) |
An abstract type of IDs
Diffstat (limited to 'tests/nextid.ur')
-rw-r--r-- | tests/nextid.ur | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/nextid.ur b/tests/nextid.ur new file mode 100644 index 00000000..8120ef0b --- /dev/null +++ b/tests/nextid.ur @@ -0,0 +1,11 @@ +fun main () : transaction page = + id1 <- fresh; + id2 <- fresh; + id3 <- fresh; + idS <- source id3; + return <xml><body> + <span id={id1}>Hi</span> <span id={id2}>there!</span><br/><br/> + <dyn signal={idS <- signal idS; return <xml><span id={idS}>Whoa-hoa!</span></xml>}/> + <button onclick={id <- fresh; set idS id}/> + Source: <dyn signal={idS <- signal idS; return (txt (<xml><span id={idS}>Whoa-hoa!</span></xml> : xbody))}/> + </body></xml> |