ArrayBuffer.isView Function (ArrayBuffer)


Determines whether an object provides a view of the buffer.



Required. The object to test.

true if either of the following is true:

  • object is a DataView object.

  •  object is a typed array.

Otherwise, the method returns false.


The following example illustrates the use of the isView function to test a typed array and a DataView object.

var uint = new UInt8ClampedArray(10);

if(console && console.log) {
    console.log( ArrayBuffer.isView(uint) ); // Outputs true
var dataView = new DataView(uint.buffer);

if(console && console.log) {
    console.log( ArrayBuffer.isView(dataView) ); // Outputs true.


Supported in the Internet Explorer 11 standards document mode. Also supported in Windows Store apps (Windows 8.1). See Version Information.

Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards. Not supported in Windows 8 or Windows Phone 8.1.