Skip to content

Instantly share code, notes, and snippets.

@Prinzhorn
Last active January 1, 2020 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Prinzhorn/5a9d7db4e4fb9372b2e6 to your computer and use it in GitHub Desktop.
Save Prinzhorn/5a9d7db4e4fb9372b2e6 to your computer and use it in GitHub Desktop.
Internet Explorer 11 Blob from DataView throws InvalidStateError
var buffer = new ArrayBuffer(8);
var left = new DataView(buffer, 0, 4);
try {
//Throws InvalidStateError in IE 11.
//It does work if we use a specific view like Uint8Array and not the generic DataView contructor.
new Blob([left]);
} catch(ex) {
alert(ex.message);
}
@dfkaye
Copy link

dfkaye commented Jan 1, 2020

@tchansen - I tried your solution this morning and it works - thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment