support.js: add function replaceNode

This commit is contained in:
hallgren
2013-03-27 16:35:32 +00:00
parent ca09371166
commit e4809aba37

View File

@@ -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);
}