1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:17:34 +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:
Andreas Kling 2022-04-11 16:10:55 +02:00
parent 9ad9c72827
commit 66618a666b
5 changed files with 134 additions and 26 deletions

View file

@ -6,6 +6,7 @@ interface CSSStyleDeclaration {
CSSOMString getPropertyValue(CSSOMString property);
[CEReactions] undefined setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value);
[CEReactions] undefined setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, [LegacyNullToEmptyString] optional CSSOMString priority = "");
[CEReactions] CSSOMString removeProperty(CSSOMString property);
};