comparison src/monoize.sml @ 1680:5b2c7b9f6017

Fix fetching of keycodes for key events
author Adam Chlipala <adam@chlipala.net>
date Sun, 15 Jan 2012 14:45:06 -0500
parents a12186d99e4f
children ac141fbb313a
comparison
equal deleted inserted replaced
1679:3636d0eeb39c 1680:5b2c7b9f6017
3245 (L'.EFfiApp ("Basis", "kc", []), loc)), 3245 (L'.EFfiApp ("Basis", "kc", []), loc)),
3246 loc), (L'.ERecord [], loc)), loc)), loc) 3246 loc), (L'.ERecord [], loc)), loc)), loc)
3247 in 3247 in
3248 case x of 3248 case x of
3249 "Onkeyup" => 3249 "Onkeyup" =>
3250 SOME (strcat [str ("((function(c){addOnKeyUp(d,function(){window.uw_event=window.event;return c();});})(exec("), 3250 SOME (strcat [str ("((function(c){addOnKeyUp(d,function(ev){window.uw_event=ev?ev:window.event;return c();});})(exec("),
3251 (L'.EJavaScript (L'.Script, e), loc), 3251 (L'.EJavaScript (L'.Script, e), loc),
3252 str ")));"]) 3252 str ")));"])
3253 | _ => 3253 | _ =>
3254 SOME (strcat [str ("((function(c){d." ^ lowercaseFirst x ^ "=function(){window.uw_event=window.event;return c();};})(exec("), 3254 SOME (strcat [str ("((function(c){d." ^ lowercaseFirst x ^ "=function(ev){window.uw_event=ev?ev:window.event;return c();};})(exec("),
3255 (L'.EJavaScript (L'.Script, e), loc), 3255 (L'.EJavaScript (L'.Script, e), loc),
3256 str ")));"]) 3256 str ")));"])
3257 end 3257 end
3258 else 3258 else
3259 SOME (strcat [str ("d." ^ lowercaseFirst x ^ "=exec("), 3259 SOME (strcat [str ("d." ^ lowercaseFirst x ^ "=exec("),