возможно вам нужно добавить алгоритм совместимости из MDC
вот сокращенная версия Array.every
, Array.filter
, Array.forEach
, Array.indexOf
, Array.lastIndexOf
, Array.map
, Array.reduce
, Array.reduceRight
, Array.some
, Function.bind
, Object.keys
if(!Array.prototype.every)Array.prototype.every=function(fun,thisp){var len=this.length>>>0;if(typeof fun!="function")throw new TypeError;var thisp=arguments[1];for(var i=0;i<len;i++)if(i in this&&!fun.call(thisp,this[i],i,this))return false;return true}; if(!Array.prototype.filter)Array.prototype.filter=function(fun,thisp){var len=this.length>>>0;if(typeof fun!="function")throw new TypeError;var res=[];var thisp=arguments[1];for(var i=0;i<len;i++)if(i in this){var val=this[i];if(fun.call(thisp,val,i,this))res.push(val)}return res}; if(!Array.prototype.forEach)Array.prototype.forEach=function(fun,thisp){var len=this.length>>>0;if(typeof fun!="function")throw new TypeError;var thisp=arguments[1];for(var i=0;i<len;i++)if(i in this)fun.call(thisp,this[i],i,this)};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(elt){var len=this.length>>>0;var from=Number(arguments[1])||0;from=from<0?Math.ceil(from):Math.floor(from);if(from<0)from+=len;for(;from<len;from++)if(from in this&&this[from]===elt)return from;return-1}; if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(elt){var len=this.length;var from=Number(arguments[1]);if(isNaN(from))from=len-1;else{from=from<0?Math.ceil(from):Math.floor(from);if(from<0)from+=len;else if(from>=len)from=len-1}for(;from>-1;from--)if(from in this&&this[from]===elt)return from;return-1}; if(!Array.prototype.map)Array.prototype.map=function(fun,thisp){var len=this.length>>>0;if(typeof fun!="function")throw new TypeError;var res=new Array(len);var thisp=arguments[1];for(var i=0;i<len;i++)if(i in this)res[i]=fun.call(thisp,this[i],i,this);return res}; if(!Array.prototype.reduce)Array.prototype.reduce=function(fun){var len=this.length>>>0;if(typeof fun!="function")throw new TypeError;if(len==0&&arguments.length==1)throw new TypeError;var i=0;if(arguments.length>=2)var rv=arguments[1];else{do{if(i in this){var rv=this[i++];break}if(++i>=len)throw new TypeError;}while(true)}for(;i<len;i++)if(i in this)rv=fun.call(undefined,rv,this[i],i,this);return rv}; if(!Array.prototype.reduceRight)Array.prototype.reduceRight=function(fun){var len=this.length>>>0;if(typeof fun!="function")throw new TypeError;if(len==0&&arguments.length==1)throw new TypeError;var i=len-1;if(arguments.length>=2)var rv=arguments[1];else{do{if(i in this){var rv=this[i--];break}if(--i<0)throw new TypeError;}while(true)}for(;i>=0;i--)if(i in this)rv=fun.call(undefined,rv,this[i],i,this);return rv}; if(!Array.prototype.some)Array.prototype.some=function(fun,thisp){var i=0,len=this.length>>>0;if(typeof fun!="function")throw new TypeError;var thisp=arguments[1];for(;i<len;i++)if(i in this&&fun.call(thisp,this[i],i,this))return true;return false}; if(!Function.prototype.bind)Function.prototype.bind=function(context){if(typeof this!=="function")throw new TypeError;var _arguments=Array.prototype.slice.call(arguments,1),_this=this,_concat=Array.prototype.concat,_function=function(){return _this.apply(this instanceof _dummy?this:context,_concat.apply(_arguments,arguments))},_dummy=function(){};_dummy.prototype=_this.prototype;_function.prototype=new _dummy;return _function}; Object.keys=Object.keys||function(o){var result=[];for(var name in o)if(o.hasOwnProperty(name))result.push(name);return result};