mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibWebView: Clear the Inspector DOM/accessibility trees upon reset
This prevents rendering stale trees while navigating to a new page. The old non-WebView inspector widgets behaved this way.
This commit is contained in:
parent
60c7ff9db1
commit
41ffc69c9d
2 changed files with 16 additions and 2 deletions
|
@ -181,12 +181,13 @@ void InspectorClient::inspect()
|
|||
|
||||
void InspectorClient::reset()
|
||||
{
|
||||
static constexpr auto script = "inspector.reset();"sv;
|
||||
m_inspector_web_view.run_javascript(script);
|
||||
|
||||
m_body_node_id.clear();
|
||||
m_pending_selection.clear();
|
||||
|
||||
m_dom_tree_loaded = false;
|
||||
|
||||
clear_console_output();
|
||||
m_highest_notified_message_index = -1;
|
||||
m_highest_received_message_index = -1;
|
||||
m_waiting_for_messages = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue