From 68dec2801d09f7b9ed6a53fa45ab012e835c4c79 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 26 Mar 2020 12:19:01 +0100 Subject: [PATCH] LibJS: Add Object::own_properties() convenience accessor --- Libraries/LibJS/Runtime/Object.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/LibJS/Runtime/Object.h b/Libraries/LibJS/Runtime/Object.h index 8b68469b08..149255139e 100644 --- a/Libraries/LibJS/Runtime/Object.h +++ b/Libraries/LibJS/Runtime/Object.h @@ -74,6 +74,8 @@ public: virtual Value to_primitive(PreferredType preferred_type = PreferredType::Default) const; virtual Value to_string() const; + const HashMap& own_properties() const { return m_properties; } + private: HashMap m_properties; Object* m_prototype { nullptr };