summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/Object.h
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Runtime/Object.h')
-rw-r--r--Libraries/LibJS/Runtime/Object.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Libraries/LibJS/Runtime/Object.h b/Libraries/LibJS/Runtime/Object.h
index 7b9c8dcdfb..90fe25b852 100644
--- a/Libraries/LibJS/Runtime/Object.h
+++ b/Libraries/LibJS/Runtime/Object.h
@@ -52,8 +52,14 @@ public:
void put(const FlyString& property_name, Value);
void put(PropertyName, Value);
- virtual Optional<Value> get_own_property(const Object& this_object, const FlyString& property_name) const;
- virtual bool put_own_property(Object& this_object, const FlyString& property_name, Value);
+ Optional<Value> get_own_property(const Object& this_object, const FlyString& property_name) const;
+
+ enum class PutOwnPropertyMode {
+ Put,
+ DefineProperty,
+ };
+
+ void put_own_property(Object& this_object, const FlyString& property_name, u8 attributes, Value, PutOwnPropertyMode);
void put_native_function(const FlyString& property_name, AK::Function<Value(Interpreter&)>, i32 length = 0);
void put_native_property(const FlyString& property_name, AK::Function<Value(Interpreter&)> getter, AK::Function<void(Interpreter&, Value)> setter);