1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

Ladybird: Add a "Reload" action to reload the current URL

This commit is contained in:
Andreas Kling 2022-07-05 21:10:50 +02:00 committed by Andrew Kaster
parent 7bf3010185
commit 69d264828f
4 changed files with 26 additions and 0 deletions

View file

@ -298,6 +298,12 @@ WebView::~WebView()
{
}
void WebView::reload()
{
auto url = m_page_client->page().top_level_browsing_context().active_document()->url();
m_page_client->load(url);
}
void WebView::load(String const& url)
{
m_page_client->load(AK::URL(url));