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:
parent
1400a160bc
commit
74c71804c7
3 changed files with 29 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue