mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-17 09:53:07 +09:00
Issue #2246 - Implement Array find from last.
Based on the implementation from Mozilla bug 1704385.
This commit is contained in:
parent
6ae0a69ac7
commit
bbb91e4833
5 changed files with 161 additions and 0 deletions
|
|
@ -3191,6 +3191,10 @@ static const JSFunctionSpec array_methods[] = {
|
|||
|
||||
/* ES2022 additions */
|
||||
JS_SELF_HOSTED_FN("at", "ArrayAt", 1,0),
|
||||
|
||||
/* ES2023 proposals */
|
||||
JS_SELF_HOSTED_FN("findLast", "ArrayFindLast", 1,0),
|
||||
JS_SELF_HOSTED_FN("findLastIndex", "ArrayFindLastIndex", 1,0),
|
||||
|
||||
JS_FS_END
|
||||
};
|
||||
|
|
@ -3356,6 +3360,8 @@ array_proto_finish(JSContext* cx, JS::HandleObject ctor, JS::HandleObject proto)
|
|||
!DefineProperty(cx, unscopables, cx->names().fill, value) ||
|
||||
!DefineProperty(cx, unscopables, cx->names().find, value) ||
|
||||
!DefineProperty(cx, unscopables, cx->names().findIndex, value) ||
|
||||
!DefineProperty(cx, unscopables, cx->names().findLast, value) ||
|
||||
!DefineProperty(cx, unscopables, cx->names().findLastIndex, value) ||
|
||||
!DefineProperty(cx, unscopables, cx->names().flat, value) ||
|
||||
!DefineProperty(cx, unscopables, cx->names().flatMap, value) ||
|
||||
!DefineProperty(cx, unscopables, cx->names().includes, value) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue