modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
37 lines (34 loc) • 941 B
JavaScript
/*!
{
"name": "Typed arrays",
"property": "typedarrays",
"caniuse": "typedarrays",
"tags": ["js"],
"authors": ["Stanley Stuart (@fivetanley)"],
"notes": [{
"name": "MDN documentation",
"href": "https://developer.mozilla.org/en-US/docs/JavaScript_typed_arrays"
},{
"name": "Kronos spec",
"href": "https://www.khronos.org/registry/typedarray/specs/latest/"
}],
"polyfills": ["joshuabell-polyfill"]
}
!*/
/* DOC
Detects support for native binary data manipulation via Typed Arrays in JavaScript.
Does not check for DataView support; use `Modernizr.dataview` for that.
*/
define(['Modernizr'], function(Modernizr) {
// Should fail in:
// Internet Explorer <= 9
// Firefox <= 3.6
// Chrome <= 6.0
// iOS Safari < 4.2
// Safari < 5.1
// Opera < 11.6
// Opera Mini, <= 7.0
// Android Browser < 4.0
// Blackberry Browser < 10.0
Modernizr.addTest('typedarrays', 'ArrayBuffer' in window);
});