Class: Leaf

hijos. Leaf

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

Properties:
Name Type Description
hijos.Leaf.superConstructor
Source:
  • maria.js, line 563

<readonly> nextSibling :hijos.Leaf

The next sibling Leaf of this object. Null if this object is not the child of any Node or this object is the last child of a Node.

Source:
  • maria.js, line 569

<readonly> parentNode :hijos.Leaf

The parent Node of this object. Null if this object is not the child of any Node.

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 any Node or this object is the first child of a Node.

Source:
  • maria.js, line 567

Methods

<static> mixin(obj)

Mixes in the Leaf methods into any object. Be sure to call the hijos.Leaf constructor to initialize the Leaf'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 this Leaf object is not contained by a Node.

Source:
  • maria.js, line 611