mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
LibWeb+WebContent: Add option to dump session history of a traversable
This commit is contained in:
parent
537bf4c917
commit
aef4b84e22
4 changed files with 37 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/Scripting/ClassicScript.h>
|
||||
#include <LibWeb/HTML/Storage.h>
|
||||
#include <LibWeb/HTML/TraversableNavigable.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Layout/Viewport.h>
|
||||
#include <LibWeb/Loader/ContentFilter.h>
|
||||
|
@ -359,6 +360,11 @@ void ConnectionFromClient::report_finished_handling_input_event(bool event_was_h
|
|||
|
||||
void ConnectionFromClient::debug_request(DeprecatedString const& request, DeprecatedString const& argument)
|
||||
{
|
||||
if (request == "dump-session-history") {
|
||||
auto const& traversable = page().top_level_traversable();
|
||||
Web::dump_tree(*traversable);
|
||||
}
|
||||
|
||||
if (request == "dump-dom-tree") {
|
||||
if (auto* doc = page().top_level_browsing_context().active_document())
|
||||
Web::dump_tree(*doc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue