paulmillr / es6-shim

ECMAScript 6 compatibility shims for legacy JS engines
http://paulmillr.com
MIT License
3.11k stars 387 forks source link

IE10 and others: ArrayBuffer missing prototype and getter #386

Open Xotic750 opened 8 years ago

Xotic750 commented 8 years ago

Similar to the DataView issue. https://github.com/paulmillr/es6-shim/issues/385 Listed as compatible on MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer

try {
    console.log(ArrayBuffer.prototype.byteLength);
} catch (e) {
    console.log(e);
}
var a = Object.getPrototypeOf(new ArrayBuffer(4));
console.log(a);
var x = Object.getOwnPropertyDescriptor(a, 'byteLength').get;
console.log(x);
console.log(x.call(new ArrayBuffer(4)));

http://jsfiddle.net/Xotic750/vfL7zd0b/2/

ljharb commented 8 years ago

https://github.com/paulmillr/es6-shim/issues/385#issuecomment-164314707