Mercurial > urweb
annotate tests/lessSafeFfi.ur @ 2119:5439b35c5d0b
Add 'download' attribute to <a/>, part of HTML5
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Sun, 26 Oct 2014 14:07:07 +0000 |
parents | 3d10ae22abd6 |
children |
rev | line source |
---|---|
adam@2010 | 1 ffi foo : int -> int |
adam@2010 | 2 ffi bar serverOnly benignEffectful : int -> transaction unit |
adam@2010 | 3 ffi baz : transaction int |
adam@2038 | 4 ffi adder : int -> int -> int |
adam@2010 | 5 |
adam@2038 | 6 ffi bup jsFunc "alert" : string -> transaction unit |
adam@2039 | 7 ffi alert : string -> transaction unit |
adam@2010 | 8 |
adam@2010 | 9 fun other () : transaction page = |
adam@2010 | 10 (*bar 17; |
adam@2010 | 11 q <- baz;*) |
adam@2010 | 12 return <xml><body> |
adam@2010 | 13 (*{[foo 42]}, {[q]}*) |
adam@2039 | 14 <button value="bup" onclick={fn _ => bup "asdf"}/> |
adam@2039 | 15 <button value="alert" onclick={fn _ => alert "qqqz"}/> |
adam@2010 | 16 </body></xml> |
adam@2010 | 17 |
adam@2010 | 18 fun main () = return <xml><body> |
adam@2010 | 19 <form> |
adam@2010 | 20 <submit action={other}/> |
adam@2010 | 21 </form> |
adam@2010 | 22 </body></xml> |