annotate tests/lessSafeFfi.ur @ 2116:ebfaab689570

The 2nd half of proper CSRF protection related to environment variables
author Adam Chlipala <adam@chlipala.net>
date Thu, 12 Feb 2015 15:09:26 -0500
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>