From 7e214fee01800b5bc982dde14c0c290b3758125a Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 27 Mar 2013 16:35:32 +0000 Subject: [PATCH] support.js: add function replaceNode --- src/www/js/support.js | 4 ++++ 1 file changed, 4 insertions(+) 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); }