1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:37:44 +00:00

LibJS: Implement Object.defineProperties()

This commit is contained in:
Linus Groh 2021-04-10 18:39:11 +02:00 committed by Andreas Kling
parent 275da6fcc9
commit da8a35a79e
6 changed files with 120 additions and 0 deletions

View file

@ -115,6 +115,8 @@ public:
bool define_native_function(const StringOrSymbol& property_name, AK::Function<Value(VM&, GlobalObject&)>, i32 length = 0, PropertyAttributes attributes = default_attributes);
bool define_native_property(const StringOrSymbol& property_name, AK::Function<Value(VM&, GlobalObject&)> getter, AK::Function<void(VM&, GlobalObject&, Value)> setter, PropertyAttributes attributes = default_attributes);
void define_properties(Value properties);
virtual bool delete_property(const PropertyName&);
virtual bool is_array() const { return false; }