Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

!Object.construct polyfill

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: #polyfill
ADD COMMENT
Topic
Name
3+5 =