mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibWeb+LibWebView: Add a button to the Inspector to export its contents
When working on the Inspector's HTML, it's often kind of tricky to debug when an element is styled / positioned incorrectly. We don't have a way to inspect the Inspector itself. This adds a button to the Inspector to export its HTML/CSS/JS contents to the downloads directory. This allows for more easily testing changes, especially by opening the exported HTML in another browser's dev tools. We will ultimately likely remove this button (or make it hidden) by the time we are production-ready. But it's quite useful for now.
This commit is contained in:
parent
cde7c91c54
commit
3ec5c1941f
Notes:
github-actions[bot]
2024-08-20 07:29:17 +00:00
Author: https://github.com/trflynn89
Commit: 3ec5c1941f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1122
15 changed files with 123 additions and 9 deletions
|
@ -693,6 +693,14 @@ void WebContentClient::inspector_did_execute_console_script(u64 page_id, String
|
|||
}
|
||||
}
|
||||
|
||||
void WebContentClient::inspector_did_export_inspector_html(u64 page_id, String const& html)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
if (view->on_inspector_exported_inspector_html)
|
||||
view->on_inspector_exported_inspector_html(html);
|
||||
}
|
||||
}
|
||||
|
||||
Messages::WebContentClient::RequestWorkerAgentResponse WebContentClient::request_worker_agent(u64 page_id)
|
||||
{
|
||||
if (auto view = view_for_page_id(page_id); view.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue