PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.31k stars 358 forks source link

Refused to create a TrustedTypePolicy on LinkedIn #994

Closed AssafFink closed 3 months ago

AssafFink commented 3 months ago

What happened?

on LinkedIn content page, I'm getting the following console crashes:

Refused to create a TrustedTypePolicy named 'trusted-html-plasmo-loading' because it violates the following Content Security Policy directive: "trusted-types 'allow-duplicates' default jSecure highcharts dompurify".

And then I'm getting the following crash:

TypeError: Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy "trusted-html-plasmo-loading" disallowed.

I tried a brand new Plasmo project on LinkedIn and still getting the same crashes.

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

AssafFink commented 3 months ago

Just realized, that this happens only on development. When I'm running pnpm build and test the production version, it works fine, without the above LinkedIn content crashes.

louisgv commented 3 months ago

Duplicate: #985