/// <summary> /// Sets the root node for this store. See also the root config option. /// </summary> /// <param name="node"></param> public virtual void SetRootNode(Node node) { this.Call("setRootNode", new JRawValue(node.ToScript())); }
/// <summary> /// Replaces one child node in this node with another. /// </summary> /// <param name="newChild">The replacement node</param> /// <param name="oldChild">The node to replace</param> public virtual void ReplaceChild(Node newChild, NodeProxy oldChild) { this.Call("replaceChild", new JRawValue(newChild.ToScript()), new JRawValue(oldChild.NodeInstance)); }
/// <summary> /// Sets root node of this tree. /// </summary> /// <param name="node"></param> public virtual void SetRootNode(Node node) { this.Call("setRootNode", new JRawValue(node.ToScript())); }
/// <summary> /// Inserts the first node before the second node in this nodes childNodes collection. /// </summary> /// <param name="node">The node to insert</param> /// <param name="refNode">The node to insert before</param> public virtual void InsertBefore(Node node, NodeProxy refNode) { this.Call("insertBefore", new JRawValue(node.ToScript()), new JRawValue(refNode.NodeInstance)); }
/// <summary> /// Insert a node into this node /// </summary> /// <param name="index">The zero-based index to insert the node at</param> /// <param name="node">The node to insert</param> public virtual void InsertChild(int index, Node node) { this.Call("insertChild", index, new JRawValue(node.ToScript())); }
/// <summary> /// Insert node(s) as the last child node of the root node. /// /// If the node was previously a child node of another parent node, it will be removed from that node first. /// </summary> /// <param name="node">The node or Array of nodes to append</param> public virtual void AppendChild(Node node) { this.Call("appendChild", new JRawValue(node.ToScript(false))); }