diff --git a/core/engine/src/builtins/typed_array/builtin.rs b/core/engine/src/builtins/typed_array/builtin.rs index e2dd9aa4a2a..60ab66c33a2 100644 --- a/core/engine/src/builtins/typed_array/builtin.rs +++ b/core/engine/src/builtins/typed_array/builtin.rs @@ -120,7 +120,7 @@ impl IntrinsicObject for BuiltinTypedArray { .method(Self::find_index, js_string!("findIndex"), 1) .method(Self::find_last, js_string!("findLast"), 1) .method(Self::find_last_index, js_string!("findLastIndex"), 1) - .method(Self::foreach, js_string!("forEach"), 1) + .method(Self::for_each, js_string!("forEach"), 1) .method(Self::includes, js_string!("includes"), 1) .method(Self::index_of, js_string!("indexOf"), 1) .method(Self::join, js_string!("join"), 1) @@ -998,7 +998,7 @@ impl BuiltinTypedArray { /// - [ECMAScript reference][spec] /// /// [spec]: https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach - pub(crate) fn foreach( + pub(crate) fn for_each( this: &JsValue, args: &[JsValue], context: &mut Context, diff --git a/core/engine/src/object/builtins/jstypedarray.rs b/core/engine/src/object/builtins/jstypedarray.rs index 1b75c16d4fd..70fbae063ab 100644 --- a/core/engine/src/object/builtins/jstypedarray.rs +++ b/core/engine/src/object/builtins/jstypedarray.rs @@ -695,7 +695,7 @@ impl JsTypedArray { this_arg: Option, context: &mut Context, ) -> JsResult { - BuiltinTypedArray::foreach( + BuiltinTypedArray::for_each( &self.inner.clone().into(), &[callback.into(), this_arg.into_or_undefined()], context,