2
0

es5-sham.min.js 2.9 KB

123456
  1. (function(e){"function"==typeof define?define(e):"function"==typeof YUI?YUI.add("es5-sham",e):e()})(function(){function e(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:f)});var d=Function.prototype.call,f=Object.prototype,g=d.bind(f.hasOwnProperty),h;if(h=g(f,"__defineGetter__"))defineGetter=d.bind(f.__defineGetter__),defineSetter=d.bind(f.__defineSetter__),
  2. lookupGetter=d.bind(f.__lookupGetter__),lookupSetter=d.bind(f.__lookupSetter__);Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+a);if(g(a,b)){var c={enumerable:!0,configurable:!0};if(h){var j=a.__proto__;a.__proto__=f;var d=lookupGetter(a,b),e=lookupSetter(a,b);a.__proto__=j;if(d||e)return d&&(c.get=d),e&&(c.set=e),c}c.value=a[b];return c}});
  3. Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)});Object.create||(Object.create=function(a,b){function c(){}var d;if(null===a)d={__proto__:null};else{if("object"!==typeof a&&"function"!==typeof a)throw new TypeError("Object prototype may only be an Object or null");c.prototype=a;d=new c;d.__proto__=a}void 0!==b&&Object.defineProperties(d,b);return d});if(Object.defineProperty){var d=e({}),k="undefined"==typeof document||e(document.createElement("div"));if(!d||
  4. !k)var i=Object.defineProperty}if(!Object.defineProperty||i)Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.defineProperty called on non-object: "+a);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError("Property description must be an object: "+c);if(i)try{return i.call(Object,a,b,c)}catch(d){}if(g(c,"value"))if(h&&(lookupGetter(a,b)||lookupSetter(a,b))){var e=a.__proto__;a.__proto__=f;delete a[b];a[b]=c.value;
  5. a.__proto__=e}else a[b]=c.value;else{if(!h)throw new TypeError("getters & setters can not be defined on this javascript engine");g(c,"get")&&defineGetter(a,b,c.get);g(c,"set")&&defineSetter(a,b,c.set)}return a};Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)g(b,c)&&"__proto__"!=c&&Object.defineProperty(a,c,b[c]);return a});Object.seal||(Object.seal=function(a){return a});Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(m){var l=
  6. Object.freeze;Object.freeze=function(a){return"function"==typeof a?a:l(a)}}Object.preventExtensions||(Object.preventExtensions=function(a){return a});Object.isSealed||(Object.isSealed=function(){return!1});Object.isFrozen||(Object.isFrozen=function(){return!1});Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)!==a)throw new TypeError;for(var b="";g(a,b);)b+="?";a[b]=!0;var c=g(a,b);delete a[b];return c})});