TypedArray.prototype属性表示TypedArray构造器的原型.
TypedArray.prototype 属性的属性特性: |
|
|---|---|
| writable | false |
| enumerable | false |
| configurable | false |
TypedArray 实例继承自 TypedArray.prototype. 你可以通过该原型对象为所有的类型化数组(typed array types)实例添加属性和方法.
关于继承的更多的信息请参见关于TypedArray 的描述.
TypedArray.prototype.constructorTypedArray.prototype.buffer 只读 ArrayBuffer. 创建时已被固化,因此是只读的.TypedArray.prototype.byteLength 只读 ArrayBuffer读取的字节长度. 创建时已被固化,因此是只读的.TypedArray.prototype.byteOffset 只读 ArrayBuffer读取时的字节偏移量.创建时已被固化,因此是只读的.TypedArray.prototype.length 只读 TypedArray.prototype.copyWithin()Array.prototype.copyWithin().TypedArray.prototype.entries()Array Iterator 对象,该对象包含数组中每一个索引的键值对.参见 Array.prototype.entries().TypedArray.prototype.every()Array.prototype.every().TypedArray.prototype.fill()Array.prototype.fill().TypedArray.prototype.filter()Array.prototype.filter().TypedArray.prototype.find()undefined . 参见 Array.prototype.find().TypedArray.prototype.findIndex()Array.prototype.findIndex().TypedArray.prototype.forEach()Array.prototype.forEach().TypedArray.prototype.includes() Array.prototype.includes().TypedArray.prototype.indexOf()Array.prototype.indexOf().TypedArray.prototype.join()Array.prototype.join().TypedArray.prototype.keys()Array.prototype.keys().TypedArray.prototype.lastIndexOf()Array.prototype.lastIndexOf().TypedArray.prototype.map()Array.prototype.map().TypedArray.prototype.move() 未实现TypedArray.prototype.copyWithin().TypedArray.prototype.reduce()Array.prototype.reduce().TypedArray.prototype.reduceRight()reduce() 的执行方向相反). 参见Array.prototype.reduceRight().TypedArray.prototype.reverse()Array.prototype.reverse().TypedArray.prototype.set()TypedArray.prototype.slice()Array.prototype.slice().TypedArray.prototype.some()Array.prototype.some().TypedArray.prototype.sort()Array.prototype.sort().TypedArray.prototype.subarray()TypedArray.prototype.values()Array.prototype.values().TypedArray.prototype.toLocaleString()Array.prototype.toLocaleString().TypedArray.prototype.toString()Array.prototype.toString().TypedArray.prototype[@@iterator]()| 规范 | 状态 | 备注 |
|---|---|---|
| ECMAScript 2015 (6th Edition, ECMA-262) TypedArray prototype |
Standard | Initial definition. |
| ECMAScript Latest Draft (ECMA-262) TypedArray prototype |
Draft |
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 7.0 | 4.0 (2) | 10 | 11.6 | 5.1 |
| Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | 4.0 | (Yes) | 4.0 (2) | 10 | 11.6 | 4.2 |