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:
parent
1ccf37a6ac
commit
b8fa9ac7e7
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue