diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-07-21 13:55:35 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-07-21 13:55:35 -0400 |
commit | 8ac6c0fe4425753c64fa0ef0a129d33eef36cb5c (patch) | |
tree | dd773f933c8b843112da1e81715f42c40cab8d8f /src | |
parent | 6ee57363d23e05fd783d8b7d151a249c0efdcd23 (diff) |
<active>
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) |