mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Expose barebones CSSStyleDeclaration to JavaScript
You can now access an element's inline style via Element.style. The interface is not very capable yet though. :^)
This commit is contained in:
@@ -37,4 +37,11 @@ CSSStyleDeclaration::~CSSStyleDeclaration()
|
||||
{
|
||||
}
|
||||
|
||||
String CSSStyleDeclaration::item(size_t index) const
|
||||
{
|
||||
if (index >= m_properties.size())
|
||||
return {};
|
||||
return CSS::string_from_property_id(m_properties[index].property_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user