mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibWeb: Implement CSSStyleDeclaration.{set,remove}Property close to spec
We already had setProperty() but it was full of ad-hoc idiosyncracies. This patch aligns setProperty() with the CSSOM spec and also implements removeProperty() since that's actually needed by setProperty() now. Some things fixed by this: - We now support the "priority" parameter to setProperty() - Element "style" attributes now update to reflect CSSOM mutations
This commit is contained in:
parent
9ad9c72827
commit
66618a666b
5 changed files with 134 additions and 26 deletions
|
@ -22,7 +22,8 @@ public:
|
|||
virtual size_t length() const override;
|
||||
virtual String item(size_t index) const override;
|
||||
virtual Optional<StyleProperty> property(PropertyID) const override;
|
||||
virtual bool set_property(PropertyID, StringView css_text) override;
|
||||
virtual DOM::ExceptionOr<void> set_property(PropertyID, StringView css_text, StringView priority) override;
|
||||
virtual DOM::ExceptionOr<String> remove_property(PropertyID) override;
|
||||
|
||||
virtual String serialized() const override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue