UNPKG

extendscript-es5-shim

Version:
17 lines (16 loc) 561 B
/* https://github.com/es-shims/es5-shim/blob/master/es5-sham.js */ // ES5 15.2.3.10 // http://es5.github.com/#x15.2.3.10 if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { if (Object(object) !== object) { throw new TypeError('Object.preventExtensions can only be called on Objects.'); } // this is misleading and breaks feature-detection, but // allows "securable" code to "gracefully" degrade to working // but insecure code. return object; }; }