new Leaf()
A constructor function for creating Leaf
objects to be used as part
of the composite design pattern.
var leaf = new hijos.Leaf();
To attach a Leaf
to a Node
, use the Node
's child
manipulation methods: appendChild
, insertBefore
, replaceChild
.
To remove a Leaf
from a Node
use the Node
's removeChild
method.
- Source:
- maria.js, line 552
Members
-
<static> superConstructor
-
- Source:
- maria.js, line 563
Properties:
Name Type Description hijos.Leaf.superConstructor
-
<readonly> nextSibling :hijos.Leaf
-
The next sibling
Leaf
of this object. Null if this object is not the child of anyNode
or this object is the last child of aNode
.- Source:
- maria.js, line 569
-
<readonly> parentNode :hijos.Leaf
-
The parent
Node
of this object. Null if this object is not the child of anyNode
.- Source:
- maria.js, line 565
-
<readonly> previousSibling :hijos.Leaf
-
The previous sibling
Leaf
of this object. Null if this object is not the child of anyNode
or this object is the first child of aNode
.- Source:
- maria.js, line 567
Methods
-
<static> mixin(obj)
-
Mixes in the
Leaf
methods into any object. Be sure to call thehijos.Leaf
constructor to initialize theLeaf
's properties.app.MyView = function() { hijos.Leaf.call(this); }; hijos.Leaf.mixin(app.MyView.prototype);
Parameters:
Name Type Description obj
Object The object to become a
Leaf
.- Source:
- maria.js, line 631
-
destroy()
-
Call before your application code looses its last reference to the object. Generally this will be called for you by the destroy method of the containing
Node
object unless thisLeaf
object is not contained by aNode
.- Source:
- maria.js, line 611