mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
support.js: add function replaceNode
This commit is contained in:
@@ -238,6 +238,10 @@ function appendChildren(el,ds) {
|
|||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function replaceNode(el,ref) {
|
||||||
|
ref.parentNode.replaceChild(el,ref)
|
||||||
|
}
|
||||||
|
|
||||||
function insertFirst(parent,child) {
|
function insertFirst(parent,child) {
|
||||||
parent.insertBefore(child,parent.firstChild);
|
parent.insertBefore(child,parent.firstChild);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user