From f92a38c957b15bd5c4243d6aba527a1db8edc473 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 22 Jul 2012 09:42:17 -0400 Subject: Nicer semantics --- lib/js/urweb.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/js') diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 87adc0a3..1f003fc3 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -803,7 +803,6 @@ function dyn(pnode, s) { var dummy = document.createElement("body"); dummy.innerHTML = "" + html + "
"; - runScripts(dummy); var table = x.parentNode; if (table) { @@ -831,12 +830,12 @@ function dyn(pnode, s) { for (var node = tbody.firstChild; node; node = next) { next = node.nextSibling; table.insertBefore(node, x); + runScripts(node); } } } else if (pnode == "tr") { var dummy = document.createElement("body"); dummy.innerHTML = "" + html + "
"; - runScripts(dummy); var table = x.parentNode; if (table) { @@ -854,14 +853,15 @@ function dyn(pnode, s) { for (var node = tr.firstChild; node; node = next) { next = node.nextSibling; table.insertBefore(node, x); + runScripts(node); } } } else { firstChild = document.createElement("span"); firstChild.innerHTML = html; - runScripts(firstChild); if (x.parentNode) x.parentNode.insertBefore(firstChild, x); + runScripts(firstChild); } }; -- cgit v1.2.3