blob: 345e3aa831404037dd1dd52dcf12b82ae32e9b79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
fun main () : transaction page =
s <- source "";
b <- Buffer.create;
txt <- source "";
return <xml><body onload={onError (fn xml => Buffer.write b (show xml));
onFail (fn s => alert ("FAIL! " ^ s))}>
<dyn signal={s <- signal s; return <xml>{[s]}</xml>}/><br/>
<dyn signal={s <- signal s; if s = "" then return <xml>Init</xml> else error <xml>Crapky</xml>}/><br/>
<dyn signal={s <- signal s; return <xml>"{[s]}"</xml>}/><br/>
<ctextbox source={txt}/> <button onclick={s' <- get txt; set s s'; set txt ""}/>
<hr/>
<dyn signal={Buffer.render b}/>
</body></xml>
|