Mercurial > urweb
comparison lib/js/urweb.js @ 945:7710f65935b6
Filters displaying awfully
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 15 Sep 2009 16:06:12 -0400 |
parents | d136bc34e4ca |
children | 2412cb10c97c |
comparison
equal
deleted
inserted
replaced
944:da3ec6014d2f | 945:7710f65935b6 |
---|---|
304 runScripts(dummy); | 304 runScripts(dummy); |
305 var table = x.parentNode; | 305 var table = x.parentNode; |
306 | 306 |
307 var arr = dummy.getElementsByTagName("tbody"); | 307 var arr = dummy.getElementsByTagName("tbody"); |
308 firstChild = null; | 308 firstChild = null; |
309 if (arr.length > 0 && table != null) { | 309 var tbody; |
310 var tbody = arr[0], next; | 310 if (arr.length > 0 && table != null) |
311 firstChild = document.createElement("script"); | 311 tbody = arr[0]; |
312 table.insertBefore(firstChild, x); | 312 else |
313 for (var node = tbody.firstChild; node; node = next) { | 313 tbody = dummy; |
314 next = node.nextSibling; | 314 |
315 table.insertBefore(node, x); | 315 var next; |
316 } | 316 firstChild = document.createElement("script"); |
317 table.insertBefore(firstChild, x); | |
318 for (var node = tbody.firstChild; node; node = next) { | |
319 next = node.nextSibling; | |
320 table.insertBefore(node, x); | |
317 } | 321 } |
318 } else if (pnode == "tr") { | 322 } else if (pnode == "tr") { |
319 var dummy = document.createElement("body"); | 323 var dummy = document.createElement("body"); |
320 dummy.innerHTML = "<table><tr>" + html + "</tr></table>"; | 324 dummy.innerHTML = "<table><tr>" + html + "</tr></table>"; |
321 runScripts(dummy); | 325 runScripts(dummy); |