mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibJS: Add basic Array constructor
We only support Array() with 0 or 1 parameters so far.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user