diff --git a/Userland/Libraries/LibWeb/Dump.cpp b/Userland/Libraries/LibWeb/Dump.cpp index 4322129ed1..6990dd2327 100644 --- a/Userland/Libraries/LibWeb/Dump.cpp +++ b/Userland/Libraries/LibWeb/Dump.cpp @@ -52,16 +52,16 @@ void dump_tree(StringBuilder& builder, DOM::Node const& node) } ++indent; if (is(node) && verify_cast(node).shadow_root()) { - dump_tree(*verify_cast(node).shadow_root()); + dump_tree(builder, *verify_cast(node).shadow_root()); } if (is(node)) { if (!is(node)) { - static_cast(node).for_each_child([](auto& child) { - dump_tree(child); + static_cast(node).for_each_child([&](auto& child) { + dump_tree(builder, child); }); } else { auto& template_element = verify_cast(node); - dump_tree(template_element.content()); + dump_tree(builder, template_element.content()); } } --indent;