Background
With a bit of research, I found that although ArrayBufferView not initially detected (via [NoInterfaceObject]), there seemed to be widespread agreement that this should be due to my described use case.
The original convention was to expose the ArrayBufferView constructor in the ArrayBufferView namespace, which was implemented in Safari (and still works in 6.1.1) and Chrome, but was then pulled from Chrome in favor of the static method ArrayBuffer.isView() .
Meanwhile, Mozilla (still) talks about implementing ArrayBuffer.isView() .
In short:
Safari provides an ArrayBufferView constructor
Chrome has ArrayBuffer.isView()
There is nothing in Firefox
IE - I haven't even come close ...
Question
So my question. What is the most concise way to check if an object is an instance of ArrayBufferView?
javascript instanceof arraybuffer typedarray
james
source share