mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibJS: Add Object.defineProperty() and start caring about attributes
We now care (a little bit) about the "configurable" and "writable" property attributes. Property attributes are stored together with the property name in the Shape object. Forward transitions are not attribute-savvy and will cause poor Shape reuse in the case of multiple same-name properties with different attributes. Oh, and this patch also adds Object.getOwnPropertyDescriptor() :^)
This commit is contained in:
parent
1570e67881
commit
e6d920d87d
7 changed files with 121 additions and 16 deletions
|
@ -42,6 +42,8 @@ private:
|
|||
virtual bool has_constructor() const override { return true; }
|
||||
virtual const char* class_name() const override { return "ObjectConstructor"; }
|
||||
|
||||
static Value define_property(Interpreter&);
|
||||
static Value get_own_property_descriptor(Interpreter&);
|
||||
static Value get_own_property_names(Interpreter&);
|
||||
static Value get_prototype_of(Interpreter&);
|
||||
static Value set_prototype_of(Interpreter&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue