1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 03:45:06 +00:00

Ladybird: Add "View Source" menu action (Ctrl+U)

This commit is contained in:
Andreas Kling 2022-07-09 17:46:11 +02:00 committed by Andrew Kaster
parent 1400a160bc
commit 74c71804c7
3 changed files with 29 additions and 0 deletions

View file

@ -664,3 +664,11 @@ void WebView::debug_request(String const& request, String const& argument)
doc->window().local_storage()->dump();
}
}
String WebView::source() const
{
auto* document = m_page_client->page().top_level_browsing_context().active_document();
if (!document)
return String::empty();
return document->source();
}