Skip to content

injectCSS throw This document requires 'TrustedHTML' assignment. #555

Description

@coolcorexix

When trying to inject the Modal Component from antd design to Gmail page with a chrome extension, I have this error which broke the attempt.

image image

But if I edit the built output to wrap a try / catch around the line of code that create the problem then everything go smoothly

try {
styleNode.innerHTML = css;
} catch {
}

I am confused, this is preventing me from making my chrome extension work on Gmail.

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