1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

LibJS: Add "at" to Array.prototype[@@unscopables]

This commit is contained in:
Linus Groh 2021-10-23 02:29:14 +01:00 committed by Andreas Kling
parent 534fd41fa3
commit d655a0a42e

View file

@ -82,6 +82,7 @@ void ArrayPrototype::initialize(GlobalObject& global_object)
// 23.1.3.35 Array.prototype [ @@unscopables ], https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
// With proposal, https://tc39.es/proposal-array-find-from-last/index.html#sec-array.prototype-@@unscopables
auto* unscopable_list = Object::create(global_object, nullptr);
MUST(unscopable_list->create_data_property_or_throw(vm.names.at, Value(true)));
MUST(unscopable_list->create_data_property_or_throw(vm.names.copyWithin, Value(true)));
MUST(unscopable_list->create_data_property_or_throw(vm.names.entries, Value(true)));
MUST(unscopable_list->create_data_property_or_throw(vm.names.fill, Value(true)));