mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02: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:
Notes:
sideshowbarker
2024-07-17 12:05:00 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/66618a666b
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user