Skip to content

Feature: Refactor style management to be CSP-safe #8363

@etrepum

Description

@etrepum

Description

.setAttribute('style', …) and .style.cssText = … violate the style-src-attr CSP directive where you are essentially not allowed to have the browser parse CSS after initial page load.

Most use cases we have are simply convenient ways to set it to specific values or to support user extension, both of which can be done with style objects instead, and with extensions and middleware (#8353) that will get even easier.

Impact

Will allow lexical to be used on security-conscious pages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement over existing featurehtml

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions