Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

OBject.construct

if (!Object.construct) {
  Object.construct = function(base) {
    var instance = Object.create(base);
    if (instance.initialize)
      instance.initialize.apply(instance, [].slice.call(arguments, 1));
    return instance;
  }
}
Source by codeincomplete.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
8+8 =