diff options
| author | hallgren <hallgren@chalmers.se> | 2013-03-27 16:35:32 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2013-03-27 16:35:32 +0000 |
| commit | 7e214fee01800b5bc982dde14c0c290b3758125a (patch) | |
| tree | 472aea3070251edeaf40285c07b80395c9c71e7d /src/www | |
| parent | 1ff78dae97fdf6c7c977e4f19ce110d0cd5aef66 (diff) | |
support.js: add function replaceNode
Diffstat (limited to 'src/www')
| -rw-r--r-- | src/www/js/support.js | 4 |
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); } |
