Internet Explorer Error : SCRIPT5009: ArrayBuffer is undefined

I am receiving an error in internet explorer 9 and under which does not occur on other browsers. It's:

SCRIPT5009: 'ArrayBuffer' is undefined

My code is as follows

    var rawLength = raw.length;
    var array = new Uint8Array(new ArrayBuffer(rawLength));
    for(i = 0; i < rawLength; i++) {
           array[i] = raw.charCodeAt(i);

The line which breaks is var array = new Uint8Array(new ArrayBuffer(rawLength));

Does anyone know if there is a solution or workaround for this? I require my functionality to work in all browsers.



ArrayBuffer isn't supported until IE10 (and I think this shows it:

You can use a polyfill, and here's one:

Polyfill taken from:


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.