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
Notes: sideshowbarker 2024-07-17 18:46:30 +09:00

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);
}