diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-01-22 20:25:14 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-01-22 20:25:14 -0500 |
commit | d35c26d04ae2a6a979b21c82603cce0a3ea330c4 (patch) | |
tree | 95c82a3c6cb68f2d41b337a3c9158faaa06e8c0d /lib/js/urweb.js | |
parent | 09210d4813022ea450408f486f9d25e79a7f01d1 (diff) |
Fix runtime system handling of <dyn> inside <table> inside <dyn>
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r-- | lib/js/urweb.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index adab5f43..b557147b 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -699,10 +699,15 @@ function normalizeTable(table) { for (var tbody = table.firstChild; tbody; tbody = tbody.nextSibling) { if (tbody.tagName == "TBODY") { + var firstChild = tbody.firstChild; + for (script = table.firstChild; script && script != tbody; script = next) { next = script.nextSibling; - tbody.insertBefore(script, tbody.firstChild); + if (firstChild) + tbody.insertBefore(script, firstChild); + else + tbody.appendChild(script); } return; @@ -713,7 +718,7 @@ function normalizeTable(table) { for (script = table.firstChild; script; script = next) { next = script.nextSibling; - tbody.insertBefore(script, tbody.firstChild); + tbody.appendChild(script); } table.appendChild(tbody); } |