1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:18:11 +00:00

LibWeb+WebContent: Implement asynchronous DOM Node properties call

This lets us "push" a new style-properties list to the DOM Inspector,
for example when JS changes the style of the inspected node.
This commit is contained in:
Sam Atkins 2021-08-27 12:47:30 +01:00 committed by Andreas Kling
parent 1da07734bb
commit 3b07f49d48
7 changed files with 20 additions and 1 deletions

View file

@ -281,6 +281,10 @@ Tab::Tab(BrowserWindow& window)
m_dom_inspector_widget->set_dom_json(dom_tree);
};
hooks().on_get_dom_node_properties = [this](auto node_id, auto& specified, auto& computed) {
m_dom_inspector_widget->set_dom_node_properties_json(node_id, specified, computed);
};
hooks().on_js_console_output = [this](auto& method, auto& line) {
if (m_console_window) {
auto* console_widget = static_cast<ConsoleWidget*>(m_console_window->main_widget());