mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
LibJS: Add ObjectPrototype and implement hasOwnProperty()
All Objects will now have ObjectPrototype as their prototype, unless overridden.
This commit is contained in:
parent
f1f14945cf
commit
23b1d97b0d
8 changed files with 114 additions and 0 deletions
|
@ -54,6 +54,8 @@ public:
|
|||
const Object* prototype() const { return m_prototype; }
|
||||
void set_prototype(Object* prototype) { m_prototype = prototype; }
|
||||
|
||||
bool has_own_property(const String& property_name) const;
|
||||
|
||||
private:
|
||||
HashMap<String, Value> m_properties;
|
||||
Object* m_prototype { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue