André Bargull (2013-07-30T09:21:21.000Z)
> >/  > * ArrayBuffer.isView
> />/  yup.  The use cases for isView aren't all that clear to me.  It could be
> />/  expressed a @@isView test if it has important use cases.
> /
>
> I'm not familiar enough with ArrayBuffers to understand the consequences.
> By analogy with Array.isArray, if a proxy-for-arraybuffer automatically
> upholds all observable invariants of ArrayBuffers, then arguably the test
> should return true for proxies. What would be the observable invariants of
> an ArrayBuffer?

ArrayBuffer.isView() should not return `true` for exotic array objects. 
That was just a spec bug, fixed in rev16 
(https://bugs.ecmascript.org/show_bug.cgi?id=1570).
As currently spec'ed, ArrayBuffer.isView() only returns true for 
TypedArray objects and DataView objects (both kind of objects have got a 
[[ViewedArrayBuffer]] internal data property). And there are no 
observable invariants which can be used for this case.


- André
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130730/324fb007/attachment.html>
domenic at domenicdenicola.com (2013-08-04T22:49:35.087Z)
> I'm not familiar enough with ArrayBuffers to understand the consequences.
> By analogy with Array.isArray, if a proxy-for-arraybuffer automatically
> upholds all observable invariants of ArrayBuffers, then arguably the test
> should return true for proxies. What would be the observable invariants of
> an ArrayBuffer?

ArrayBuffer.isView() should not return `true` for exotic array objects. 
That was just a spec bug, fixed in rev16 
(https://bugs.ecmascript.org/show_bug.cgi?id=1570).
As currently spec'ed, ArrayBuffer.isView() only returns true for 
TypedArray objects and DataView objects (both kind of objects have got a 
[[ViewedArrayBuffer]] internal data property). And there are no 
observable invariants which can be used for this case.