Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
coolcorexix opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@coolcorexix
Copy link

coolcorexix commented Jun 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant