summaryrefslogtreecommitdiff
path: root/tests/a_case_of_the_splits.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2018-10-19 16:03:57 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2018-10-19 16:03:57 -0400
commit1a4a8b5ab8eb499ee2217c966f7fbb7716adf9e9 (patch)
tree531a9fbee277d0d0430ee4b5b9085cf41856ed53 /tests/a_case_of_the_splits.ur
parentd800556bd50ecb78c21343a288f9475b8b870162 (diff)
Client-side escaping of HTML should be prepared for structured HTML trees, not just strings (closes #141)
Diffstat (limited to 'tests/a_case_of_the_splits.ur')
-rw-r--r--tests/a_case_of_the_splits.ur17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/a_case_of_the_splits.ur b/tests/a_case_of_the_splits.ur
new file mode 100644
index 00000000..2029729e
--- /dev/null
+++ b/tests/a_case_of_the_splits.ur
@@ -0,0 +1,17 @@
+fun newCounter () : transaction xbody =
+ x <- source 0;
+ return <xml>
+ <dyn signal={n <- signal x; return <xml>{[n]}</xml>}/>
+ </xml>
+
+fun main () : transaction page =
+ ls <- source ([] : list xbody);
+ return <xml>
+ <body>
+ <button value="Add" onclick={fn _ =>
+ l <- get ls;
+ c <- newCounter ();
+ set ls (c :: l)}/>
+ <dyn signal={l <- signal ls; return <xml>{[l]}</xml>}/>
+ </body>
+ </xml>