diff options
Diffstat (limited to 'tests/activeBlock.ur')
-rw-r--r-- | tests/activeBlock.ur | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/activeBlock.ur b/tests/activeBlock.ur new file mode 100644 index 00000000..5560edda --- /dev/null +++ b/tests/activeBlock.ur @@ -0,0 +1,10 @@ +fun main () : transaction page = return <xml><body> + <active code={s <- source ""; return <xml> + <dyn signal={s <- signal s; return (txt s)}/> + <button onclick={fn _ => set s "Hi!"}/> + </xml>}/> + + <active code={sleep 1; return <xml>Hi!</xml>}/> + + <active code={spawn (sleep 1; alert "Hi!"); return <xml>Success</xml>}/> +</body></xml> |