mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
LibJS: Split more native object constructors into construct/initialize
This commit is contained in:
parent
9610d18ebb
commit
06e29fac57
16 changed files with 64 additions and 33 deletions
|
@ -95,10 +95,10 @@ void GlobalObject::initialize()
|
|||
define_property("undefined", js_undefined(), 0);
|
||||
|
||||
define_property("globalThis", this, attr);
|
||||
define_property("console", heap().allocate<ConsoleObject>(*this), attr);
|
||||
define_property("Math", heap().allocate<MathObject>(*this), attr);
|
||||
define_property("JSON", heap().allocate<JSONObject>(*this), attr);
|
||||
define_property("Reflect", heap().allocate<ReflectObject>(*this), attr);
|
||||
define_property("console", heap().allocate<ConsoleObject>(*this, *this), attr);
|
||||
define_property("Math", heap().allocate<MathObject>(*this, *this), attr);
|
||||
define_property("JSON", heap().allocate<JSONObject>(*this, *this), attr);
|
||||
define_property("Reflect", heap().allocate<ReflectObject>(*this, *this), attr);
|
||||
|
||||
add_constructor("Array", m_array_constructor, *m_array_prototype);
|
||||
add_constructor("BigInt", m_bigint_constructor, *m_bigint_prototype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue