From 5f073da34bf3da253166dd042e51b8f9a60c1a69 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 30 Jul 2015 00:38:00 -0700 Subject: [PATCH] fix documentation on typed array detection --- index.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 81f9714..c018fee 100644 --- a/index.js +++ b/index.js @@ -24,19 +24,24 @@ var rootParent = {} * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * * Note: * - * - Implementation must support adding new properties to `Uint8Array` instances. - * Firefox 4-29 lacked support, fixed in Firefox 30+. - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property + * on objects. * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. * - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will - * get the Object implementation, which is slower but will work correctly. + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. */ Buffer.TYPED_ARRAY_SUPPORT = (function () { function Bar () {} -- 2.34.1