Closed Bug 1351137 Opened 7 years ago Closed 4 years ago

all DataView methods need parameter documentation

Categories

(Developer Documentation Graveyard :: General, enhancement, P5)

All
Other
enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jan, Unassigned)

References

()

Details

:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: jan@parwinr.com

:: Details

In the documentation, the parameter lists of DataView methods are empty, e.g.:
DataView.prototype.setInt8()

eventhough the description talks about 'offset' (and value) parameters:
Stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the view.
So there are obviously (2) parameter(s): the byte offset (and the value to store).

Only the example:
dv.setInt16(1, 42);
dv.getInt16(1); //42
makes me guess that the 1-st parameter is the offset and the 2-nd is the value.

Also, what happens if I write at 'wrong' byte offset, e.g. beyond the ArrayBuffer's length?
And what happens if I read from buffer at offset where nothing was written, yet (e.g. is the buffer initialized with some values)?
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.