diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-07-19 17:45:02 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-07-19 17:45:02 -0400 |
commit | 1409fcbff76f7846cbcb3434ebb5c0617177cf40 (patch) | |
tree | 89ce0f6149e50fdfece4b083c2be2033c7727c63 /lib/js | |
parent | bbac4b6f898bbad12e17db434cc24c69cb448ef5 (diff) |
Working on Grid; have gone from one dynamic table bizareness to another
Diffstat (limited to 'lib/js')
-rw-r--r-- | lib/js/urweb.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 3d4dbea2..dd66b55e 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -223,12 +223,17 @@ function lastParent() { return pos.parentNode; } +function parent() { + return thisScript ? thisScript.parentNode : lastParent(); +} + function addNode(node) { if (thisScript) { thisScript.parentNode.appendChild(node); thisScript.parentNode.removeChild(thisScript); - } else + } else { lastParent().appendChild(node); + } } function setHTML(html) { @@ -266,10 +271,8 @@ function runScripts(node) { // Dynamic tree entry points -var dynDepth = 0; - function dyn(s) { - var x = document.createElement("span"); + var x = parent(); x.dead = false; x.signal = s; x.sources = null; @@ -298,7 +301,6 @@ function dyn(s) { x.closures = cls.v; runScripts(x); }; - addNode(x); populate(x); } |