diff lib/js/urweb.js @ 847:0f7e2cca6d9b

<dyn> inside <table>; fix Specialize bug with datatype decls generating other mutually-recursive datatype decls
author Adam Chlipala <adamc@hcoop.net>
date Sat, 13 Jun 2009 14:29:36 -0400
parents 44c2c089ca15
children bcad392e288e
line wrap: on
line diff
--- a/lib/js/urweb.js	Tue Jun 09 18:11:59 2009 -0400
+++ b/lib/js/urweb.js	Sat Jun 13 14:29:36 2009 -0400
@@ -278,15 +278,20 @@
     for (var ls = x.closures; ls; ls = ls.next)
       freeClosure(ls.data);
 
-    var spans = x.getElementsByTagName("span");
-    for (var i = 0; i < spans.length; ++i) {
-      var span = spans[i];
-      span.dead = true;
-      for (var ls = span.sources; ls; ls = ls.next)
-        ls.data.dyns = remove(span, ls.data.dyns);
-      for (var ls = span.closures; ls; ls = ls.next)
-        freeClosure(ls.data);
-    }
+    var doKind = function(kind) {
+      var arr = x.getElementsByTagName(kind);
+      for (var i = 0; i < arr.length; ++i) {
+        var span = arr[i];
+        span.dead = true;
+        for (var ls = span.sources; ls; ls = ls.next)
+          ls.data.dyns = remove(span, ls.data.dyns);
+        for (var ls = span.closures; ls; ls = ls.next)
+          freeClosure(ls.data);
+      }
+    };
+
+    doKind("span");
+    doKind("tbody");
 
     var cls = {v : null};
     x.innerHTML = flatten(cls, v);