summaryrefslogtreecommitdiff
path: root/src/monoize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-08-06 11:54:28 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-08-06 11:54:28 -0400
commit4234e12dd51638797197ea6e6f03c05453527961 (patch)
treed59a03ba3b733dcdec316831dc6b38adb4808118 /src/monoize.sml
parent94a1373401529f500640b0c0628e7173612cdabe (diff)
dtable example and demos both working
Diffstat (limited to 'src/monoize.sml')
-rw-r--r--src/monoize.sml39
1 files changed, 13 insertions, 26 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index 488f3b20..f0491198 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -2646,24 +2646,11 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
| "dyn" =>
(case attrs of
[("Signal", e, _)] =>
- let
- val inTable = case targs of
- (L.CRecord (_, ctx), _) :: _ =>
- List.exists (fn ((L.CName "Table", _), _) => true
- | _ => false) ctx
- | _ => false
-
- val tag = if inTable then
- "tbody"
- else
- "span"
- in
- ((L'.EStrcat
- ((L'.EPrim (Prim.String ("<" ^ tag ^ "><script type=\"text/javascript\">dyn(")), loc),
- (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc),
- (L'.EPrim (Prim.String (")</script></" ^ tag ^ ">")), loc)), loc)), loc),
- fm)
- end
+ ((L'.EStrcat
+ ((L'.EPrim (Prim.String ("<script type=\"text/javascript\">dyn(")), loc),
+ (L'.EStrcat ((L'.EJavaScript (L'.Script, e), loc),
+ (L'.EPrim (Prim.String (")</script>")), loc)), loc)), loc),
+ fm)
| _ => raise Fail "Monoize: Bad dyn attributes")
| "submit" => normal ("input type=\"submit\"", NONE, NONE)
@@ -2683,9 +2670,9 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
loc)), loc), fm)
end
| SOME (_, src, _) =>
- (strcat [str "<span><script type=\"text/javascript\">inp(",
+ (strcat [str "<script type=\"text/javascript\">inp(",
(L'.EJavaScript (L'.Script, src), loc),
- str ")</script></span>"],
+ str ")</script>"],
fm))
| _ => (Print.prefaces "Targs" (map (fn t => ("T", CorePrint.p_con env t)) targs);
raise Fail "No name passed to textbox tag"))
@@ -2760,9 +2747,9 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
str ")"]
val sc = setAttrs sc
in
- (strcat [str "<span><script type=\"text/javascript\">",
+ (strcat [str "<script type=\"text/javascript\">",
sc,
- str "</script></span>"],
+ str "</script>"],
fm)
end)
@@ -2783,9 +2770,9 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
str ")"]
val sc = setAttrs sc
in
- (strcat [str "<span><script type=\"text/javascript\">",
+ (strcat [str "<script type=\"text/javascript\">",
sc,
- str "</script></span>"],
+ str "</script>"],
fm)
end)
@@ -2813,9 +2800,9 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
str ")"]
val sc = setAttrs sc
in
- (strcat [str "<span><script type=\"text/javascript\">",
+ (strcat [str "<script type=\"text/javascript\">",
sc,
- str "</script></span>"],
+ str "</script>"],
fm)
end)