File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,17 @@ const HEAD_BYTE_REQUIRED = -1;
3838const EMPTY_VIEW = new DataView ( new ArrayBuffer ( 0 ) ) ;
3939const EMPTY_BYTES = new Uint8Array ( EMPTY_VIEW . buffer ) ;
4040
41+ try {
42+ // IE11: The spec says it should throw RangeError,
43+ // IE11: but in IE11 it throws TypeError.
44+ EMPTY_VIEW . getInt8 ( 0 ) ;
45+ } catch ( e ) {
46+ if ( ! ( e instanceof RangeError ) ) {
47+ throw new Error ( "This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access" ) ;
48+ }
49+ }
4150export const DataViewIndexOutOfBoundsError = RangeError ;
51+
4252const MORE_DATA = new DataViewIndexOutOfBoundsError ( "Insufficient data" ) ;
4353
4454const sharedCachedKeyDecoder = new CachedKeyDecoder ( ) ;
You can’t perform that action at this time.
0 commit comments