(function(){// IE8 simulator, by dandavis 2013. [CCBY2] // used in a real browser, it removes modern JS methods that are missing in IE8, allowing you to catch some IE8 errors in any browser. //use at top of
, before any other scripts, and use it only for testing! var var r=[], it, mx, target, i, p, ob, o={ "String": [ "length", "trim", "trimLeft", "trimRight", "repeat", "startsWith", "endsWith", "contains" ], "Array": [ "length", "filter", "forEach", "some", "every", "lastIndexOf", "reduceRight", "values", "keys", "findIndex" ], "Function": [ "length", "name", "arguments", "caller" ], "Object": [ "__defineGetter__", "__lookupGetter__", "__defineSetter__", "__lookupSetter__", "__proto__" ], "Object2": [ "length", "name", "arguments", "caller", "create", "defineProperties", "freeze", "getPrototypeOf", "getOwnPropertyNames", "is", "isExtensible", "isFrozen", "isSealed", "preventExtensions", "seal", "deliverChangeRecords", "getNotifier", "observe", "unobserve" ] }; // loop through and delete IE8's missing API features: for(it in o){ ob=o[it]; target= window[it] && window[it].prototype || Object; for(i=0, mx=ob.length;i