Content Security Policy and SRI
Run the widget under a strict CSP, and pin the CDN file with Subresource Integrity.
On this page
The widget needs no unsafe-inline and no unsafe-eval.
Content Security Policy
It injects two style tags, so pass their nonce, and the large cursor is a data: SVG image. Leave out the CDN host when you bundle the package. CI runs the widget under default-src 'none' with Trusted Types and fails on any violation.
Subresource Integrity
@1 on the CDN follows every 1.x release, so it can't carry an integrity hash. For production, pin an exact version with its hash: the browser refuses the file if the CDN ever serves something else. Compute the hash yourself or copy it from the file's page on jsdelivr.com, and update both when you upgrade.
Trusted Types
The widget builds its interface with createElement and never assigns HTML strings, so it works under require-trusted-types-for 'script' with no policy of its own.