LibJS: Add spec comments to TypedArray.prototype.entries
This commit is contained in:
parent
67ed3e1d93
commit
24caacfe28
Notes:
sideshowbarker
2024-07-17 04:21:11 +09:00
Author: https://github.com/jamierocks Commit: https://github.com/SerenityOS/serenity/commit/24caacfe28 Pull-request: https://github.com/SerenityOS/serenity/pull/16117 Reviewed-by: https://github.com/linusg ✅
1 changed files with 4 additions and 0 deletions
|
@ -387,7 +387,11 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::entries)
|
|||
{
|
||||
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));
|
||||
|
||||
// 3. Return CreateArrayIterator(O, key+value).
|
||||
return ArrayIterator::create(realm, typed_array, Object::PropertyKind::KeyAndValue);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue