LibWeb: Allow reloading the current page with location.reload()

This commit is contained in:
Andreas Kling 2020-05-18 22:05:13 +02:00
commit 3b11e471bd
Notes: sideshowbarker 2024-07-19 06:28:58 +09:00
5 changed files with 32 additions and 3 deletions

View file

@ -119,4 +119,15 @@ void Window::did_set_location_href(Badge<Bindings::LocationObject>, const String
view->load(new_href);
}
void Window::did_call_location_reload(Badge<Bindings::LocationObject>)
{
auto* frame = document().frame();
if (!frame)
return;
auto* view = frame->html_view();
if (!view)
return;
view->reload();
}
}