diff options
Diffstat (limited to 'lib/js')
-rw-r--r-- | lib/js/urweb.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 95fd6756..222a8322 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -1100,12 +1100,18 @@ function active(s) { function input(x, s, recreate, type, name) { if (name) x.name = name; if (type) x.type = type; - x.dead = false; - x.signal = ss(s); - x.sources = null; - x.recreate = recreate(x); addNode(x); - populate(x); + + var sc = document.createElement("script"); + sc.dead = false; + sc.signal = ss(s); + sc.sources = null; + sc.recreate = recreate(x); + + if (x.parentNode) + x.parentNode.insertBefore(sc, x); + + populate(sc); return x; } |