From eb64746b388cd3a3864e70039a0c04929b6bbd61 Mon Sep 17 00:00:00 2001 From: Sergey Mironov Date: Fri, 6 Dec 2013 13:59:39 +0400 Subject: Add activeHead tag. activeHead is similar to active but produces xhead instead of xbody --- lib/ur/basis.urs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/ur/basis.urs') diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 4931c97a..7637f8fa 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -782,6 +782,9 @@ val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ [Dyn]] = val active : unit -> tag [Code = transaction xbody] body [] [] [] +val activeHead : unit + -> tag [Code = transaction xhead] head [] [] [] + val head : unit -> tag [] html head [] [] val title : unit -> tag [] head [] [] [] val link : unit -> tag [Id = id, Rel = string, Typ = string, Href = url, Media = string] head [] [] [] -- cgit v1.2.3 From 0eee402a615c957f006c01d0424dae45713a9376 Mon Sep 17 00:00:00 2001 From: Sergey Mironov Date: Fri, 6 Dec 2013 14:52:47 +0400 Subject: activeHead: don't modify the head. just execute the code provided --- lib/ur/basis.urs | 2 +- src/monoize.sml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ur/basis.urs') diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 7637f8fa..66e65804 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -783,7 +783,7 @@ val active : unit -> tag [Code = transaction xbody] body [] [] [] val activeHead : unit - -> tag [Code = transaction xhead] head [] [] [] + -> tag [Code = transaction unit] head [] [] [] val head : unit -> tag [] html head [] [] val title : unit -> tag [] head [] [] [] diff --git a/src/monoize.sml b/src/monoize.sml index 8889937e..d382194f 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -3604,9 +3604,9 @@ fun monoExp (env, st, fm) (all as (e, loc)) = (case attrs of [("Code", e, _)] => ((L'.EStrcat - ((L'.EPrim (Prim.String ("")), loc)), loc)), loc), + (L'.EPrim (Prim.String (")")), loc)), loc)), loc), fm) | _ => raise Fail "Monoize: Bad attributes") -- cgit v1.2.3 From c6e641ffb3195827acbb2787bb202824fef0cfa6 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 9 Dec 2013 15:47:14 -0500 Subject: Rename to }. + \subsubsection{Node IDs} There is an abstract type of node IDs that may be assigned to \cd{id} attributes of most HTML tags. diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 66e65804..73cef3d2 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -782,7 +782,7 @@ val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ [Dyn]] = val active : unit -> tag [Code = transaction xbody] body [] [] [] -val activeHead : unit +val script : unit -> tag [Code = transaction unit] head [] [] [] val head : unit -> tag [] html head [] [] 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 attributes") - | "activeHead" => + | "script" => (case attrs of [("Code", e, _)] => ((L'.EStrcat - ((L'.EPrim (Prim.String ("")), loc)), loc)), loc), + (L'.EPrim (Prim.String ("))")), loc)), loc)), loc), fm) - | _ => raise Fail "Monoize: Bad attributes") + | _ => raise Fail "Monoize: Bad