mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00:00
LibJS: Add spec comments to TypedArray.prototype.keys
This commit is contained in:
parent
db00097700
commit
67ed3e1d93
1 changed files with 4 additions and 0 deletions
|
@ -783,7 +783,11 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::keys)
|
||||||
{
|
{
|
||||||
auto& realm = *vm.current_realm();
|
auto& realm = *vm.current_realm();
|
||||||
|
|
||||||
|
// 1. Let O be the this value.
|
||||||
|
// 2. Perform ? ValidateTypedArray(O).
|
||||||
auto* typed_array = TRY(validate_typed_array_from_this(vm));
|
auto* typed_array = TRY(validate_typed_array_from_this(vm));
|
||||||
|
|
||||||
|
// 3. Return CreateArrayIterator(O, key).
|
||||||
return ArrayIterator::create(realm, typed_array, Object::PropertyKind::Key);
|
return ArrayIterator::create(realm, typed_array, Object::PropertyKind::Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue