diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/activeFocus.ur | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/activeFocus.ur b/tests/activeFocus.ur new file mode 100644 index 00000000..94d465e9 --- /dev/null +++ b/tests/activeFocus.ur @@ -0,0 +1,18 @@ +fun main () : transaction page = + i <- fresh; + return <xml><body> + <ctextbox/> + <ctextbox id={i}/> + <active code={giveFocus i; return <xml>Done</xml>}/> + </body></xml> + +fun dynamic () : transaction page = + x <- source <xml/>; + return <xml><body> + <dyn signal={signal x}/> + <button onclick={fn _ => i <- fresh; set x <xml> + <ctextbox/> + <ctextbox id={i}/> + <active code={giveFocus i; return <xml>Done</xml>}/> + </xml>}/> + </body></xml> |