diff options
author | 2012-01-15 14:45:06 -0500 | |
---|---|---|
committer | 2012-01-15 14:45:06 -0500 | |
commit | 09210d4813022ea450408f486f9d25e79a7f01d1 (patch) | |
tree | dacd4816a1b2a83cb3588b123a0902aa3deb7f99 | |
parent | 55d0d7aa52cea7122404b7297e17a413cb2859c6 (diff) |
Fix fetching of keycodes for key events
-rw-r--r-- | demo/more/versioned1.urp | 1 | ||||
-rw-r--r-- | src/monoize.sml | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/demo/more/versioned1.urp b/demo/more/versioned1.urp index c24b3531..748a081c 100644 --- a/demo/more/versioned1.urp +++ b/demo/more/versioned1.urp @@ -1,4 +1,3 @@ -debug library versioned database dbname=test sql versioned1.sql diff --git a/src/monoize.sml b/src/monoize.sml index 44cd8bb3..ccadf936 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -3247,11 +3247,11 @@ fun monoExp (env, st, fm) (all as (e, loc)) = in case x of "Onkeyup" => - SOME (strcat [str ("((function(c){addOnKeyUp(d,function(){window.uw_event=window.event;return c();});})(exec("), + SOME (strcat [str ("((function(c){addOnKeyUp(d,function(ev){window.uw_event=ev?ev:window.event;return c();});})(exec("), (L'.EJavaScript (L'.Script, e), loc), str ")));"]) | _ => - SOME (strcat [str ("((function(c){d." ^ lowercaseFirst x ^ "=function(){window.uw_event=window.event;return c();};})(exec("), + SOME (strcat [str ("((function(c){d." ^ lowercaseFirst x ^ "=function(ev){window.uw_event=ev?ev:window.event;return c();};})(exec("), (L'.EJavaScript (L'.Script, e), loc), str ")));"]) end |