| 1 |
// Copyright (C) 2016 The V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
esid: sec-arraybuffer.isview |
| 6 |
description: > |
| 7 |
Return true if arg is an instance from a subclass of DataView |
| 8 |
info: | |
| 9 |
24.1.3.1 ArrayBuffer.isView ( arg ) |
| 10 |
|
| 11 |
1. If Type(arg) is not Object, return false. |
| 12 |
2. If arg has a [[ViewedArrayBuffer]] internal slot, return true. |
| 13 |
3. Return false. |
| 14 |
features: [class, DataView] |
| 15 |
---*/ |
| 16 |
|
| 17 |
class DV extends DataView {} |
| 18 |
|
| 19 |
var sample = new DV(new ArrayBuffer(1), 0, 0); |
| 20 |
|
| 21 |
assert(ArrayBuffer.isView(sample)); |