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;
38
38
const EMPTY_VIEW = new DataView ( new ArrayBuffer ( 0 ) ) ;
39
39
const EMPTY_BYTES = new Uint8Array ( EMPTY_VIEW . buffer ) ;
40
40
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
+ }
41
50
export const DataViewIndexOutOfBoundsError = RangeError ;
51
+
42
52
const MORE_DATA = new DataViewIndexOutOfBoundsError ( "Insufficient data" ) ;
43
53
44
54
const sharedCachedKeyDecoder = new CachedKeyDecoder ( ) ;
You can’t perform that action at this time.
0 commit comments