File: activeBlock.ur

package info (click to toggle)
urweb 20170105%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,640 kB
  • ctags: 9,972
  • sloc: ansic: 6,402; lisp: 1,198; makefile: 173; sh: 44; sql: 1
file content (10 lines) | stat: -rw-r--r-- 344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
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>