Skip to content

Commit

Permalink
Added a test for TypedArrays, because the DataView test will fail for…
Browse files Browse the repository at this point in the history
… browsers that support TypedArrays/ArrayBuffers/and views of those buffers if they do not have DataView
  • Loading branch information
fivetanley committed Aug 18, 2012
1 parent 05ddc4c commit b248337
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions feature-detects/typed-arrays.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Detect support for native binary data manipulation.
// This detection will check for everything except DataView, since versions of
// Firefox < 15 do not have support.
// Use Modernizr.dataview for DataView detection
// 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
// CanIUse Compatibility Reference: http://caniuse.com/typedarrays
// Mozilla Developer Network:
// https://developer.mozilla.org/en-US/docs/JavaScript_typed_arrays
// TypedArray Specification:
// http://www.khronos.org/registry/typedarray/specs/latest/
//
// by Stanley Stuart <fivetanley>

Modernizr.addTest('typedarrays', 'ArrayBuffer' in window );

0 comments on commit b248337

Please sign in to comment.