-
Notifications
You must be signed in to change notification settings - Fork 99
Add support for CSSStyleDeclaration.setProperty() and CSSStyleDeclaration.removeProperty() #113
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Add support for CSSStyleDeclaration.setProperty(), CSSStyleDeclaration.removeProperty(), and CSSStyleDeclaration.getPropertyValue().
These are essentially aliases for the getters and setters already present on esm/interface/css-style-declaration.js#L31-L61.
HTMLElement.style.setProperty('background-color', 'red');->HTMLElement.style.backgroundColor = 'red';(existingsetter)HTMLElement.style.removeProperty('background-color')->HTMLElement.style.backgroundColor = null;(existingsetter)HTMLElement.style.getPropertyValue('background-color')->HTMLElement.style.backgroundColor(existinggetter)
Support for these functions was also mentioned in #92 (comment) where there is some consideration from @WebReflection about whether linkedom should support it.
For reference: I am using linkedom to server-side render (SSR) https://github.com/vector-im/hydrogen-web which uses setProperty, removeProperty, and getPropertyValue in a few places. SSR project is at: https://github.com/matrix-org/matrix-public-archive and linkedom usage is in server/render-hydrogen-to-string.js.
Relevant code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers