mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:17:35 +00:00
LibWeb: Support simplest form of CSSStyleDeclaration.setProperty()
This patch adds the setProperty(name, value) API to CSSStyleDeclaration. Setting an invalid or empty value will cause the property to be removed from the declaration. Note that this only works on mutable declarations (i.e element.style) and not on resolved declarations (i.e window.getComputedStyle(element)).
This commit is contained in:
parent
e0e41116a4
commit
0ab31d8c84
4 changed files with 19 additions and 3 deletions
|
@ -44,7 +44,8 @@ bool CSSStyleDeclarationWrapper::internal_set(JS::PropertyName const& name, JS::
|
|||
if (vm().exception())
|
||||
return false;
|
||||
|
||||
return impl().set_property(property_id, css_text);
|
||||
impl().set_property(property_id, css_text);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue