- Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 2.1.5
Code
var elt = document.createElement("div"); elt.style = "test";
Expected behavior:
Should compile and run
Actual behavior:
Typescript compiler rejects the assignment to style
as invalid.
According to MDN this is a valid assignment, and it works in every modern browser. The value returned by .style
is readonly, but the property itself is not.
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug