Skip to content

setting cssText rather than style #774

@johanneswilm

Description

@johanneswilm

Aftr reading through the discussion on #212, it's still unclear to me why a CSP policy of style-src-attr 'self' will disallow:

dom.setAttribute("style", "background-color: blue;")

but not:

dom.style.cssText = "background-color: blue;"

Why is it safer to set the cssText rather than the style attribute?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions