Mercurial > urweb
comparison src/monoize.sml @ 1290:6791454653c5
Confirm boxes; proper event handler setting for ctags
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 22 Aug 2010 19:45:07 -0400 |
parents | fc7ecf8883b1 |
children | a671c986f517 |
comparison
equal
deleted
inserted
replaced
1289:3b22c3c67f35 | 1290:6791454653c5 |
---|---|
2956 val (e, s') = | 2956 val (e, s') = |
2957 case #1 dom of | 2957 case #1 dom of |
2958 L'.TRecord [] => ((L'.EApp (e, (L'.ERecord [], loc)), loc), s') | 2958 L'.TRecord [] => ((L'.EApp (e, (L'.ERecord [], loc)), loc), s') |
2959 | _ => ((L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "kc", []), loc)), | 2959 | _ => ((L'.EApp ((L'.EApp (e, (L'.EFfiApp ("Basis", "kc", []), loc)), |
2960 loc), (L'.ERecord [], loc)), loc), | 2960 loc), (L'.ERecord [], loc)), loc), |
2961 s' ^ "uwe=event;") | 2961 s' ^ "uw_event=event;") |
2962 val s' = s' ^ "exec(" | 2962 val s' = s' ^ "exec(" |
2963 in | 2963 in |
2964 ((L'.EStrcat (s, | 2964 ((L'.EStrcat (s, |
2965 (L'.EStrcat ( | 2965 (L'.EStrcat ( |
2966 (L'.EPrim (Prim.String s'), loc), | 2966 (L'.EPrim (Prim.String s'), loc), |
3066 (fn ("Source", _, _) => NONE | 3066 (fn ("Source", _, _) => NONE |
3067 | ("Onchange", e, _) => | 3067 | ("Onchange", e, _) => |
3068 SOME (strcat [str "addOnChange(d,exec(", | 3068 SOME (strcat [str "addOnChange(d,exec(", |
3069 (L'.EJavaScript (L'.Script, e), loc), | 3069 (L'.EJavaScript (L'.Script, e), loc), |
3070 str "))"]) | 3070 str "))"]) |
3071 | (x, e, _) => | 3071 | (x, e, (L'.TFun ((L'.TRecord [], _), _), _)) => |
3072 SOME (strcat [str ("d." ^ lowercaseFirst x ^ "=exec("), | 3072 SOME (strcat [str ("d." ^ lowercaseFirst x ^ "=exec("), |
3073 (L'.EJavaScript (L'.Script, e), loc), | 3073 (L'.EJavaScript (L'.Script, e), loc), |
3074 str ");"])) | 3074 str ");"]) |
3075 | (x, e, _) => | |
3076 let | |
3077 val e = (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TRecord [], loc), | |
3078 (L'.EApp ((L'.EApp (liftExpInExp 0 e, | |
3079 (L'.EFfiApp ("Basis", "kc", []), loc)), | |
3080 loc), (L'.ERecord [], loc)), loc)), loc) | |
3081 in | |
3082 case x of | |
3083 "Onkeyup" => | |
3084 SOME (strcat [str ("((function(c){addOnKeyUp(d,function(){window.uw_event=window.event;return c();});})(exec("), | |
3085 (L'.EJavaScript (L'.Script, e), loc), | |
3086 str ")));"]) | |
3087 | _ => | |
3088 SOME (strcat [str ("((function(c){d." ^ lowercaseFirst x ^ "=function(){window.uw_event=window.event;return c();};})(exec("), | |
3089 (L'.EJavaScript (L'.Script, e), loc), | |
3090 str ")));"]) | |
3091 end) | |
3075 attrs | 3092 attrs |
3076 | 3093 |
3077 val t = (L'.TFfi ("Basis", "string"), loc) | 3094 val t = (L'.TFfi ("Basis", "string"), loc) |
3078 val setClass = (L'.ECase (class, | 3095 val setClass = (L'.ECase (class, |
3079 [((L'.PNone t, loc), | 3096 [((L'.PNone t, loc), |