Javascript Object Inherits(parent)

Description

Javascript Object Inherits(parent)


/* GENERAL HELPER */
Object.prototype.Inherits = function(parent) {
 if(arguments.length > 1) {
  parent.apply(this, Array.prototype.slice.call(arguments, 1) );
 } else {      /*w ww  .ja v  a 2  s. c om*/
  parent.call(this);
 }
};



PreviousNext

Related