Mercurial > urweb
comparison src/monoize.sml @ 1926:44f607a7f4cd
Rename <activeHead> to <script> and make it work properly
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Mon, 09 Dec 2013 15:47:14 -0500 |
parents | 15802a00816c |
children | f1c211936557 |
comparison
equal
deleted
inserted
replaced
1925:15802a00816c | 1926:44f607a7f4cd |
---|---|
3262 val (class, fm) = monoExp (env, st, fm) class | 3262 val (class, fm) = monoExp (env, st, fm) class |
3263 val (dynClass, fm) = monoExp (env, st, fm) dynClass | 3263 val (dynClass, fm) = monoExp (env, st, fm) dynClass |
3264 val (style, fm) = monoExp (env, st, fm) style | 3264 val (style, fm) = monoExp (env, st, fm) style |
3265 val (dynStyle, fm) = monoExp (env, st, fm) dynStyle | 3265 val (dynStyle, fm) = monoExp (env, st, fm) dynStyle |
3266 | 3266 |
3267 val dynamics = ["dyn", "ctextbox", "ccheckbox", "cselect", "coption", "ctextarea", "active", "activeHead"] | 3267 val dynamics = ["dyn", "ctextbox", "ccheckbox", "cselect", "coption", "ctextarea", "active", "script"] |
3268 | 3268 |
3269 fun isSome (e, _) = | 3269 fun isSome (e, _) = |
3270 case e of | 3270 case e of |
3271 L'.ESome _ => true | 3271 L'.ESome _ => true |
3272 | _ => false | 3272 | _ => false |
3598 (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), | 3598 (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), |
3599 (L'.EPrim (Prim.String ("))</script>")), loc)), loc)), loc), | 3599 (L'.EPrim (Prim.String ("))</script>")), loc)), loc)), loc), |
3600 fm) | 3600 fm) |
3601 | _ => raise Fail "Monoize: Bad <active> attributes") | 3601 | _ => raise Fail "Monoize: Bad <active> attributes") |
3602 | 3602 |
3603 | "activeHead" => | 3603 | "script" => |
3604 (case attrs of | 3604 (case attrs of |
3605 [("Code", e, _)] => | 3605 [("Code", e, _)] => |
3606 ((L'.EStrcat | 3606 ((L'.EStrcat |
3607 ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">execD(")), loc), | 3607 ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">execF(execD(")), loc), |
3608 (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), | 3608 (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc), |
3609 (L'.EPrim (Prim.String (")</script>")), loc)), loc)), loc), | 3609 (L'.EPrim (Prim.String ("))</script>")), loc)), loc)), loc), |
3610 fm) | 3610 fm) |
3611 | _ => raise Fail "Monoize: Bad <activeHead> attributes") | 3611 | _ => raise Fail "Monoize: Bad <script> attributes") |
3612 | 3612 |
3613 | "submit" => normal ("input type=\"submit\"", NONE) | 3613 | "submit" => normal ("input type=\"submit\"", NONE) |
3614 | "image" => normal ("input type=\"image\"", NONE) | 3614 | "image" => normal ("input type=\"image\"", NONE) |
3615 | "button" => normal ("input type=\"submit\"", NONE) | 3615 | "button" => normal ("input type=\"submit\"", NONE) |
3616 | "hidden" => input "hidden" | 3616 | "hidden" => input "hidden" |