mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
[AST] Added node.removeChildren()
This commit is contained in:
parent
3964e50c05
commit
340b28804f
@ -49,6 +49,10 @@ class ArrayContainer extends Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeChildren() {
|
||||||
|
this.array.length = 0;
|
||||||
|
}
|
||||||
|
|
||||||
prependChild(newChild) {
|
prependChild(newChild) {
|
||||||
ok(newChild, '"newChild" is required"');
|
ok(newChild, '"newChild" is required"');
|
||||||
this.array.unshift(newChild);
|
this.array.unshift(newChild);
|
||||||
|
|||||||
@ -143,6 +143,10 @@ class Node {
|
|||||||
this.body.moveChildrenTo(targetNode);
|
this.body.moveChildrenTo(targetNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeChildren() {
|
||||||
|
this.body.removeChildren();
|
||||||
|
}
|
||||||
|
|
||||||
forEachNextSibling(callback, thisObj) {
|
forEachNextSibling(callback, thisObj) {
|
||||||
var container = this.container;
|
var container = this.container;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user