-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Missing bytesLength
from Array
#135
Comments
The property is private on normal Arrays, though this restriction is currently not enforced. Accessing it nonetheless is technically possible but considered unsafe. Within the standard library, we'd do something like changetype<ArrayBufferView>(theArray).byteLength or load<i32>(changetype<usize>(theArray), offsetof<ArrayBufferView>("byteLength")) to make the nature of the operation clear. Its's mostly an implementation detail in AS to have it on Arrays as well, while in JS only ArrayBufferViews (basically the typed arrays like |
Oh... The
Returns |
The solution is to use However, both |
Currently, on Array documentation, doesn't mention the existence of
bytesLength
:website/src/stdlib/array.md
Lines 36 to 43 in 50cc6b2
However, it's possible to use
array.bytesLength
.The text was updated successfully, but these errors were encountered: