1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 20:25:12 +00:00

LibWeb: Update Location::replace() to use navigables

This commit is contained in:
Aliaksandr Kalenik 2023-08-22 18:49:28 +02:00 committed by Andreas Kling
parent acff244335
commit d45f2a4952
4 changed files with 15 additions and 16 deletions

View file

@ -421,15 +421,6 @@ WebIDL::ExceptionOr<JS::GCPtr<WindowProxy>> Window::open_impl(StringView url, St
return target_browsing_context->window_proxy();
}
void Window::did_call_location_replace(Badge<Location>, DeprecatedString url)
{
auto* browsing_context = associated_document().browsing_context();
if (!browsing_context)
return;
auto new_url = associated_document().parse_url(url);
browsing_context->loader().load(move(new_url), FrameLoader::Type::Navigation);
}
bool Window::dispatch_event(DOM::Event& event)
{
return DOM::EventDispatcher::dispatch(*this, event, true);