WebContent: Expose custom properties to DevTools

ComputedProperties doesn't contain custom properties, at least at the
moment. So, we have to iterate them separately.
This commit is contained in:
Sam Atkins 2025-09-26 14:31:57 +01:00 committed by Andreas Kling
parent 1ccf37a6ac
commit b8fa9ac7e7
Notes: github-actions[bot] 2025-09-26 20:33:04 +00:00

View file

@ -484,6 +484,12 @@ void ConnectionFromClient::inspect_dom_node(u64 page_id, WebView::DOMNodePropert
value.to_string(Web::CSS::SerializationMode::Normal));
});
// FIXME: Custom properties are not yet included in ComputedProperties, so add them manually.
auto custom_properties = element.custom_properties(pseudo_element);
for (auto const& [name, value] : custom_properties) {
serialized.set(name, value.value->to_string(Web::CSS::SerializationMode::Normal));
}
return serialized;
};