1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 08:47:35 +00:00

LibJS: Add spec comments to %TypedArray%.prototype.values

This commit is contained in:
Jamie Mansfield 2022-11-18 17:06:04 +00:00 committed by Linus Groh
parent b2164ad979
commit 1eb15cbaf4

View file

@ -1623,7 +1623,12 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::values)
{
auto& realm = *vm.current_realm();
// 1. Let O be the this value.
auto* typed_array = TRY(typed_array_from_this(vm));
// FIXME 2. Perform ? ValidateTypedArray(O).
// 3. Return CreateArrayIterator(O, value).
return ArrayIterator::create(realm, typed_array, Object::PropertyKind::Value);
}