1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:38:13 +00:00

LibWeb: Add basic constructor/prototype to exotic objects

This commit is contained in:
Igor Pissolati 2022-04-05 17:54:04 -03:00 committed by Andreas Kling
parent 1d080e1cda
commit a387b822a0
14 changed files with 307 additions and 3 deletions

View file

@ -14,6 +14,7 @@
#include <LibWeb/Bindings/CrossOriginAbstractOperations.h>
#include <LibWeb/Bindings/DOMExceptionWrapper.h>
#include <LibWeb/Bindings/LocationObject.h>
#include <LibWeb/Bindings/LocationPrototype.h>
#include <LibWeb/Bindings/WindowObject.h>
#include <LibWeb/DOM/DOMException.h>
#include <LibWeb/DOM/Document.h>
@ -23,7 +24,7 @@ namespace Web::Bindings {
// https://html.spec.whatwg.org/multipage/history.html#the-location-interface
LocationObject::LocationObject(JS::GlobalObject& global_object)
: Object(*global_object.object_prototype())
: Object(static_cast<WindowObject&>(global_object).ensure_web_prototype<LocationPrototype>("Location"))
, m_default_properties(heap())
{
}