diff options
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp index 5d64843988..6c31ba0ff2 100644 --- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp @@ -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); } |