Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upThe length of DataView constructor doesn't match between the spec and implementations #787
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
targos
commented
Jan 28, 2017
|
The value is 1 in Edge 39.15014. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ljharb
Jan 28, 2017
Member
Unless you think it's not web compatible for those browsers to fix the length to 1, then could you file bugs on each of them to fix it?
|
Unless you think it's not web compatible for those browsers to fix the length to 1, then could you file bugs on each of them to fix it? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
arai-a
commented
Jan 28, 2017
|
filed for Firefox |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
anba
Feb 6, 2017
Contributor
If changing DataView's length from 3 to 1 is the final call for ES2017, we should also consider to change the length of the TypedArray constructors from 3 to 1, because all those constructors have the same signature: ( buffer [ , byteOffset [ , length ] ] ) (ignoring the other overloaded definitions for TypedArray constructors).
Also: test262 still expects DataView.length === 3.
|
If changing DataView's length from 3 to 1 is the final call for ES2017, we should also consider to change the length of the TypedArray constructors from 3 to 1, because all those constructors have the same signature: Also: test262 still expects |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Bump |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rwaldron
Apr 19, 2017
Contributor
@anba refers to https://github.com/tc39/test262/blob/master/test/built-ins/DataView/length.js (and others, but start there)
|
@anba refers to https://github.com/tc39/test262/blob/master/test/built-ins/DataView/length.js (and others, but start there) |
added a commit
to anba/ecma262
that referenced
this issue
Mar 6, 2018
added a commit
to anba/ecma262
that referenced
this issue
Mar 6, 2018
added a commit
to anba/ecma262
that referenced
this issue
Mar 6, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Closing per committee consensus to leave the length at 1. |
arai-a commentedJan 28, 2017
https://tc39.github.io/ecma262/#sec-dataview-buffer-byteoffset-bytelength
https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects
There is no explicit note for DataView constructor's length, so it should follow the above, and
DataView.lengthshould be 1.Many implementations, however, return 3 for
DataView.length.(haven't checked on Edge since I don't have environment to test trunk)