|
|
|
8. If ( buffer ) is true , throw a TypeError exception. 9. Let viewOffset be view .[[ByteOffset]]. 10. Let viewSize be view .[[ByteLength]]. 11. Let elementSize be the Element Size value specified in type . 12. If getIndex + elementSize > viewSize , throw a RangeError exception. 13. Let bufferIndex be getIndex + viewOffset . 14. Return ( buffer , bufferIndex , type , numberValue , false , Unordered , isLittleEndian ). The DataView : is %DataView% . is the initial value of the "DataView" property of the creates and initializes a new DataView object when called as a is not intended to be called as a function and will throw an exception when called in that manner. extends extends clause of a class definition. Subclass constructors that intend to inherit the specified DataView behaviour must include a super super call to the DataView to create and initialize subclass instances with the internal state necessary to support the DataView.prototype DataView.prototype built-in methods. When the DataView DataView function is called with at least one argument buffer , the following steps are taken: 1. If NewTarget is undefined , throw a TypeError exception. 2. Perform ? ( buffer , [[ArrayBufferData]]). 3. Let offset be ? byteOffset ). 4. If ( buffer ) is true , throw a TypeError exception. 5. Let bufferByteLength be buffer .[[ArrayBufferByteLength]]. 6. If offset > bufferByteLength , throw a RangeError exception. 7. If byteLength is undefined , then a. Let viewByteLength be bufferByteLength - offset . 8. Else, a. Let viewByteLength be ? ( byteLength ). b. If offset + viewByteLength > bufferByteLength , throw a RangeError exception. 9. Let O be ? (NewTarget, "%DataView.prototype%" , « [[DataView]], [[ViewedArrayBuffer]], [[ByteLength]], [[ByteOffset]] »). 10. If ( buffer ) is true , throw a TypeError exception. 11. Set O .[[ViewedArrayBuffer]] to buffer . 12. Set O .[[ByteLength]] to viewByteLength . 13. Set O .[[ByteOffset]] to offset . 14. Return O . The DataView : 25.3.2 The DataView Constructor 25.3.2.1 DataView ( buffer [ , byteOffset [ , byteLength ] ] ) 25.3.3 Properties of the DataView Constructor 720 |