ElementCSSInlineStyle.style should not be read-only #38838
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Milestone
TypeScript Version: Nightly
Search Terms:
DOM Element HTMLElement SVGElement inline style setter
Expected behavior:
Per https://drafts.csswg.org/cssom/#elementcssinlinestyle, the style setter is forwarded to
style.cssText
, and thus accepts a string.Actual behavior:
Type error:
Related Issues:
#13466, which (correctly) points to the old spec where
ElementCSSInlineStyle.style
was only described asreadonly
, without thePutForwards=cssText
annotation.This is however a case of an old spec that doesn't match a universal browser behavior.
w3c/csswg-drafts#5127 where I asked the W3C for clarification
Code
Output
Compiler Options
Playground Link: Provided
The text was updated successfully, but these errors were encountered: