GoogleWebComponents / google-chart

Google Charts API web components
https://www.webcomponents.org/element/@google-web-components/google-chart/elements/google-chart
Apache License 2.0
358 stars 130 forks source link

Fix Trusted Types violation in loader.ts #324

Closed bjarkler closed 2 years ago

bjarkler commented 2 years ago

The plain string assignment to script.src in loader.ts causes a Trusted Types violation, blocking Trusted Types adoption by applications that use the google-chart library. To fix the violation, a Trusted Types policy is used to promote the constant string to a TrustedScriptURL before use.