mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibWeb: Make LocationObject a PlatformObject
This commit is contained in:
parent
2fe97fa8db
commit
0e47754ac8
2 changed files with 21 additions and 9 deletions
|
@ -23,9 +23,18 @@ namespace Web::Bindings {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/history.html#the-location-interface
|
||||
LocationObject::LocationObject(JS::Realm& realm)
|
||||
: Object(verify_cast<HTML::Window>(realm.global_object()).cached_web_prototype("Location"))
|
||||
, m_default_properties(heap())
|
||||
: PlatformObject(realm)
|
||||
{
|
||||
set_prototype(&verify_cast<HTML::Window>(realm.global_object()).cached_web_prototype("Location"));
|
||||
}
|
||||
|
||||
LocationObject::~LocationObject() = default;
|
||||
|
||||
void LocationObject::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
for (auto& property : m_default_properties)
|
||||
visitor.visit(property);
|
||||
}
|
||||
|
||||
void LocationObject::initialize(JS::Realm& realm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue