| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ArrayBuffer.isView Function (ArrayBuffer) | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
1887324f-892b-4fcd-ad33-748ba9517a06 |
5 |
mikejo5000 |
mikejo |
ghogen |
ArrayBuffer.isView Function (ArrayBuffer)
Determines whether an object provides a view of the buffer.
Syntax
ArrayBuffer.isView(object) Parameters
object
Required. The object to test.
Return Value
true if either of the following is true:
-
objectis aDataViewobject. -
objectis a typed array.
Otherwise, the method returns false.
Remarks
Example
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.
} Requirements
[!INCLUDEjsv11_winonly]