Skip to content

Commit b8fa9ac

Browse files
AtkinsSJawesomekling
authored andcommitted
WebContent: Expose custom properties to DevTools
ComputedProperties doesn't contain custom properties, at least at the moment. So, we have to iterate them separately.
1 parent 1ccf37a commit b8fa9ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Services/WebContent/ConnectionFromClient.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,12 @@ void ConnectionFromClient::inspect_dom_node(u64 page_id, WebView::DOMNodePropert
484484
value.to_string(Web::CSS::SerializationMode::Normal));
485485
});
486486

487+
// FIXME: Custom properties are not yet included in ComputedProperties, so add them manually.
488+
auto custom_properties = element.custom_properties(pseudo_element);
489+
for (auto const& [name, value] : custom_properties) {
490+
serialized.set(name, value.value->to_string(Web::CSS::SerializationMode::Normal));
491+
}
492+
487493
return serialized;
488494
};
489495

0 commit comments

Comments
 (0)