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
Notes: sideshowbarker 2024-07-18 20:35:02 +09:00
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; }