mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibJS: Add basic Array constructor
We only support Array() with 0 or 1 parameters so far.
This commit is contained in:
parent
eabdbe0ee9
commit
d155491122
Notes:
sideshowbarker
2024-07-19 07:55:44 +09:00
Author: https://github.com/awesomekling
Commit: d155491122
6 changed files with 132 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/ArrayConstructor.h>
|
||||
#include <LibJS/Runtime/ConsoleObject.h>
|
||||
#include <LibJS/Runtime/DateConstructor.h>
|
||||
#include <LibJS/Runtime/ErrorConstructor.h>
|
||||
|
@ -30,6 +31,7 @@ GlobalObject::GlobalObject()
|
|||
put("Function", heap().allocate<FunctionConstructor>());
|
||||
put("Math", heap().allocate<MathObject>());
|
||||
put("Object", heap().allocate<ObjectConstructor>());
|
||||
put("Array", heap().allocate<ArrayConstructor>());
|
||||
}
|
||||
|
||||
GlobalObject::~GlobalObject()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue