summaryrefslogtreecommitdiff
path: root/src/www
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2013-03-27 16:35:32 +0000
committerhallgren <hallgren@chalmers.se>2013-03-27 16:35:32 +0000
commit7e214fee01800b5bc982dde14c0c290b3758125a (patch)
tree472aea3070251edeaf40285c07b80395c9c71e7d /src/www
parent1ff78dae97fdf6c7c977e4f19ce110d0cd5aef66 (diff)
support.js: add function replaceNode
Diffstat (limited to 'src/www')
-rw-r--r--src/www/js/support.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/www/js/support.js b/src/www/js/support.js
index 9913aa5e3..e8b7e7878 100644
--- a/src/www/js/support.js
+++ b/src/www/js/support.js
@@ -238,6 +238,10 @@ function appendChildren(el,ds) {
return el;
}
+function replaceNode(el,ref) {
+ ref.parentNode.replaceChild(el,ref)
+}
+
function insertFirst(parent,child) {
parent.insertBefore(child,parent.firstChild);
}