Closed Bug 1808741 Opened 3 years ago Closed 3 years ago

Disable setting the style attribute with lit styleMap

Categories

(Toolkit :: UI Widgets, task)

task

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: mstriemer, Assigned: mstriemer)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

By default lit sets the style="" attribute on first render to support server-side rendering. This isn't necessary for us since we can set properties using HTMLElement.style properties instead.

Setting the style="" attribute, rather than using the HTMLElement.style properties can cause problems on pages with a restrictive CSP, such as about:logins.

lit calls element.setAttribute("style", "<our styles>") on first render of an
element so that it will have the style property set in the markup if it is being
server-side rendered. We don't need that, and it causes CSP errors in
about:logins so this patches out the functionality.

https://github.com/lit/rfcs/issues/13

Pushed by mstriemer@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5d3793ddd16e Patch lit's styleMap to not set the style attribute on first render r=mtigley
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: