diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-12-09 15:47:14 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-12-09 15:47:14 -0500 |
commit | c6e641ffb3195827acbb2787bb202824fef0cfa6 (patch) | |
tree | e034f612a841d48eb9db72b593b77bd4c07c909e /src/monoize.sml | |
parent | 0eee402a615c957f006c01d0424dae45713a9376 (diff) |
Rename <activeHead> to <script> and make it work properly
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index d382194f..291c0fa3 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -3264,7 +3264,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", "active", "activeHead"] + val dynamics = ["dyn", "ctextbox", "ccheckbox", "cselect", "coption", "ctextarea", "active", "script"] fun isSome (e, _) = case e of @@ -3600,15 +3600,15 @@ fun monoExp (env, st, fm) (all as (e, loc)) = fm) | _ => raise Fail "Monoize: Bad <active> attributes") - | "activeHead" => + | "script" => (case attrs of [("Code", e, _)] => ((L'.EStrcat - ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">execD(")), loc), + ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">execF(execD(")), loc), (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), - (L'.EPrim (Prim.String (")</script>")), loc)), loc)), loc), + (L'.EPrim (Prim.String ("))</script>")), loc)), loc)), loc), fm) - | _ => raise Fail "Monoize: Bad <activeHead> attributes") + | _ => raise Fail "Monoize: Bad <script> attributes") | "submit" => normal ("input type=\"submit\"", NONE) | "image" => normal ("input type=\"image\"", NONE) |