Skip to content

Commit

Permalink
TypedArray.prototype.values() and `TypedArray.prototype[@@iterator]…
Browse files Browse the repository at this point in the history
…` should have the same value (#3096)
  • Loading branch information
HalidOdat committed Jul 9, 2023
1 parent 40f33d8 commit 4baf6e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions boa_engine/src/builtins/typed_array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl IntrinsicObject for TypedArray {
)
.property(
JsSymbol::iterator(),
values_function,
values_function.clone(),
Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE,
)
.accessor(
Expand Down Expand Up @@ -336,7 +336,11 @@ impl IntrinsicObject for TypedArray {
.method(Self::some, "some", 1)
.method(Self::sort, "sort", 1)
.method(Self::subarray, "subarray", 2)
.method(Self::values, "values", 0)
.property(
"values",
values_function,
Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE,
)
// 23.2.3.29 %TypedArray%.prototype.toString ( )
// The initial value of the %TypedArray%.prototype.toString data property is the same
// built-in function object as the Array.prototype.toString method defined in 23.1.3.30.
Expand Down

0 comments on commit 4baf6e2

Please sign in to comment.