Mercurial > urweb
comparison tests/activeBlock.ur @ 1794:4671afac15af
Change 'spawn' implementation to allow blocking within <active code>
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 25 Jul 2012 08:20:15 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1793:446e73902b09 | 1794:4671afac15af |
---|---|
1 fun main () : transaction page = return <xml><body> | |
2 <active code={s <- source ""; return <xml> | |
3 <dyn signal={s <- signal s; return (txt s)}/> | |
4 <button onclick={fn _ => set s "Hi!"}/> | |
5 </xml>}/> | |
6 | |
7 <active code={sleep 1; return <xml>Hi!</xml>}/> | |
8 | |
9 <active code={spawn (sleep 1; alert "Hi!"); return <xml>Success</xml>}/> | |
10 </body></xml> |