From 5f5478a34e8ed7b9642407b062e8c5edc6799510 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 12 Jan 2016 22:30:30 +0100 Subject: [PATCH] safari 5-7 should use typed array impl --- index.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/index.js b/index.js index ab8388f..1d22868 100644 --- a/index.js +++ b/index.js @@ -35,9 +35,6 @@ var rootParent = {} * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. * - * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property - * on objects. - * * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. * * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of @@ -51,13 +48,10 @@ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined : typedArraySupport() function typedArraySupport () { - function Bar () {} try { var arr = new Uint8Array(1) arr.foo = function () { return 42 } - arr.constructor = Bar return arr.foo() === 42 && // typed array instances can be augmented - arr.constructor === Bar && // constructor can be set typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) { -- 2.34.1