mozilla/pdf.js — Issue #1027: IE9 subarray method not defined
Author: jwagner79
Created: 2012-01-04 20:03:48+00:00
State: open

Seeing JS errors in IE9 regarding subarray method not defined.

It appears this is due to the TypedArray implementation in compatibility.js. I believe what's going on is the TypedArray is being assigned from a call to object.getBytes(). The getBytes method is using subarray to return a object. For IE9 the definition of subarray is this.slice() and an array is returned rather than TypedArray object.

I created a JSFiddle to test. In IE9 I get an error regarding subarray (FF works fine of course).
http://jsfiddle.net/KL7TX/7/

One fix would to modify compatibility.js subarray method:
function subarray(start, end) {
return new Uint8Array(this.slice(start, end));
}