mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-20 16:41:04 +00:00
34 lines
856 B
JavaScript
34 lines
856 B
JavaScript
/*!
|
|
{
|
|
"name": "ES5 Object",
|
|
"property": "es5object",
|
|
"notes": [{
|
|
"name": "ECMAScript 5.1 Language Specification",
|
|
"href": "https://www.ecma-international.org/ecma-262/5.1/"
|
|
}],
|
|
"polyfills": ["es5shim", "es5sham"],
|
|
"authors": ["Ron Waldon (@jokeyrhyme)"],
|
|
"tags": ["es5"]
|
|
}
|
|
!*/
|
|
/* DOC
|
|
Check if browser implements ECMAScript 5 Object per specification.
|
|
*/
|
|
define(['Modernizr'], function(Modernizr) {
|
|
Modernizr.addTest('es5object', function() {
|
|
return !!(Object.keys &&
|
|
Object.create &&
|
|
Object.getPrototypeOf &&
|
|
Object.getOwnPropertyNames &&
|
|
Object.isSealed &&
|
|
Object.isFrozen &&
|
|
Object.isExtensible &&
|
|
Object.getOwnPropertyDescriptor &&
|
|
Object.defineProperty &&
|
|
Object.defineProperties &&
|
|
Object.seal &&
|
|
Object.freeze &&
|
|
Object.preventExtensions);
|
|
});
|
|
});
|