mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 09:57:35 +00:00
LibWeb: Add a simple window.location object with some getters :^)
This commit is contained in:
parent
a1e7aa330c
commit
1ec4db04cd
6 changed files with 162 additions and 0 deletions
|
@ -31,6 +31,7 @@
|
|||
#include <LibJS/Runtime/Function.h>
|
||||
#include <LibJS/Runtime/Shape.h>
|
||||
#include <LibWeb/Bindings/DocumentWrapper.h>
|
||||
#include <LibWeb/Bindings/LocationObject.h>
|
||||
#include <LibWeb/Bindings/NavigatorObject.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/Bindings/XMLHttpRequestConstructor.h>
|
||||
|
@ -60,6 +61,7 @@ void WindowObject::initialize()
|
|||
put_native_function("cancelAnimationFrame", cancel_animation_frame, 1);
|
||||
|
||||
put("navigator", heap().allocate<NavigatorObject>(), JS::Attribute::Enumerable | JS::Attribute::Configurable);
|
||||
put("location", heap().allocate<LocationObject>(), JS::Attribute::Enumerable | JS::Attribute::Configurable);
|
||||
|
||||
m_xhr_prototype = heap().allocate<XMLHttpRequestPrototype>();
|
||||
m_xhr_constructor = heap().allocate<XMLHttpRequestConstructor>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue