mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibJS: Add Math.random() :^)
This commit is contained in:
parent
c4c549625f
commit
8b18674229
4 changed files with 89 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/ConsoleObject.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/MathObject.h>
|
||||
#include <LibJS/Runtime/NativeFunction.h>
|
||||
#include <LibJS/Runtime/Value.h>
|
||||
|
||||
|
@ -17,6 +18,7 @@ GlobalObject::GlobalObject()
|
|||
this_object->heap().collect_garbage();
|
||||
return js_undefined();
|
||||
});
|
||||
put("Math", heap().allocate<MathObject>());
|
||||
}
|
||||
|
||||
GlobalObject::~GlobalObject()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue