support.js: add function replaceNode
This commit is contained in:
1 parent
1ff78dae97
commit
7e214fee01
1 file changed
+4
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user