Browse Source

LibJS: Add Object::own_properties() convenience accessor

Andreas Kling 5 years ago
parent
commit
68dec2801d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Libraries/LibJS/Runtime/Object.h

+ 2 - 0
Libraries/LibJS/Runtime/Object.h

@@ -74,6 +74,8 @@ public:
     virtual Value to_primitive(PreferredType preferred_type = PreferredType::Default) const;
     virtual Value to_primitive(PreferredType preferred_type = PreferredType::Default) const;
     virtual Value to_string() const;
     virtual Value to_string() const;
 
 
+    const HashMap<FlyString, Value>& own_properties() const { return m_properties; }
+
 private:
 private:
     HashMap<FlyString, Value> m_properties;
     HashMap<FlyString, Value> m_properties;
     Object* m_prototype { nullptr };
     Object* m_prototype { nullptr };