Namespace: inheritance


JavaScript objects inheritage functions.



Call up to the superclass. This function only works if you use og.inheritance.extend to express inheritance relationships between your classes. See og.inheritance.extend

staticog.inheritance.extend(Child, Parent)

Inherit the prototype methods from one constructor into another. Usage:
function ParentClass(a, b) { } = function(a) { };

function ChildClass(a, b, c) {
  og.inheritance.base(this, a, b);
og.inheritance.extend(ChildClass, ParentClass);

var child = new ChildClass('a', 'b', 'see');; // This works.
Name Type Description
Child function Child class.
Parent function Parent class.