From 23548e783023cc454b1e2634d68b63da311c5d72 Mon Sep 17 00:00:00 2001 From: Yusuke Kawasaki Date: Sun, 19 Jun 2016 02:40:08 +0900 Subject: [PATCH] re #121: IE10-on-IE11 fails the augmentation --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e229ee8..933a972 100644 --- a/index.js +++ b/index.js @@ -52,7 +52,7 @@ exports.kMaxLength = kMaxLength() function typedArraySupport () { try { var arr = new Uint8Array(1) - arr.foo = function () { return 42 } + arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} return arr.foo() === 42 && // typed array instances can be augmented typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` -- 2.34.1