mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS: Add JSON.stringify
This commit is contained in:
parent
b4577ffcf3
commit
39576b2238
Notes:
sideshowbarker
2024-07-19 05:40:49 +09:00
Author: https://github.com/mattco98
Commit: 39576b2238
Pull-request: https://github.com/SerenityOS/serenity/pull/2545
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/awesomekling
19 changed files with 678 additions and 10 deletions
|
@ -41,6 +41,7 @@
|
|||
#include <LibJS/Runtime/FunctionConstructor.h>
|
||||
#include <LibJS/Runtime/FunctionPrototype.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/JSONObject.h>
|
||||
#include <LibJS/Runtime/MathObject.h>
|
||||
#include <LibJS/Runtime/NativeFunction.h>
|
||||
#include <LibJS/Runtime/NumberConstructor.h>
|
||||
|
@ -96,6 +97,7 @@ void GlobalObject::initialize()
|
|||
define_property("globalThis", this, attr);
|
||||
define_property("console", heap().allocate<ConsoleObject>(), attr);
|
||||
define_property("Math", heap().allocate<MathObject>(), attr);
|
||||
define_property("JSON", heap().allocate<JSONObject>(), attr);
|
||||
define_property("Reflect", heap().allocate<ReflectObject>(), attr);
|
||||
|
||||
add_constructor("Array", m_array_constructor, *m_array_prototype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue