[lit-html] Prevent styleMap from writing to the 'style' attribute.#1819
[lit-html] Prevent styleMap from writing to the 'style' attribute.#1819bicknellr wants to merge 9 commits into
styleMap from writing to the 'style' attribute.#1819Conversation
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultslit-element-list
render
update
update-reflect
lit-html-kitchen-sink
render
update
nop-update
lit-html-repeat
render
update
lit-html-template-heavy
render
update
reactive-element-list
render
update
update-reflect
|
styleMap from writing to the 'style' attribute.styleMap from writing to the 'style' attribute.
kevinpschaaf
left a comment
There was a problem hiding this comment.
Need to fix TS errors in the build, plus this one nit.
| @@ -66,10 +66,6 @@ class StyleMapDirective extends Directive { | |||
|
|
|||
| if (this._previousStyleProperties === undefined) { | |||
There was a problem hiding this comment.
This entire if can go away and instead we start with L28 initializing _previousStyleProperties: Set<string> = new Set();
|
The tests are failing because of #1920. |
|
Actually, looking into this some... I'm not sure #1920 isn't WAI too. The question is what should render if we get |
🦋 Changeset detectedLatest commit: a88cce2 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
09634ab to
a88cce2
Compare
|
This still has legit failures that I need to look at. |
Internally,
styleMapcan't update the style attribute dynamically because it isn't allowed by the sanitizer. However, this directive already handles updates using the style property, so this change falls through to use that in all cases.