diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/monoize.sml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 86d8389f..403e0b84 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -3234,7 +3234,7 @@ fun monoExp (env, st, fm) (all as (e, loc)) = val (style, fm) = monoExp (env, st, fm) style val (dynStyle, fm) = monoExp (env, st, fm) dynStyle - val dynamics = ["dyn", "ctextbox", "ccheckbox", "cselect", "coption", "ctextarea"] + val dynamics = ["dyn", "ctextbox", "ccheckbox", "cselect", "coption", "ctextarea", "active"] fun isSome (e, _) = case e of @@ -3541,9 +3541,19 @@ fun monoExp (env, st, fm) (all as (e, loc)) = (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), (L'.EPrim (Prim.String ("))</script>")), loc)), loc)), loc), fm) - | _ => raise Fail "Monoize: Bad dyn attributes" + | _ => raise Fail "Monoize: Bad <dyn> attributes" end + | "active" => + (case attrs of + [("Code", e, _)] => + ((L'.EStrcat + ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">active(execD(")), loc), + (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), + (L'.EPrim (Prim.String ("))</script>")), loc)), loc)), loc), + fm) + | _ => raise Fail "Monoize: Bad <active> attributes") + | "submit" => normal ("input type=\"submit\"", NONE) | "image" => normal ("input type=\"image\"", NONE) | "button" => normal ("input type=\"submit\"", NONE) |