diff --git a/lite-youtube.ts b/lite-youtube.ts index 48b75d8..f2db6f5 100644 --- a/lite-youtube.ts +++ b/lite-youtube.ts @@ -111,8 +111,12 @@ export class LiteYTEmbed extends HTMLElement { */ private setupDom(): void { const shadowDom = this.attachShadow({ mode: 'open' }); + let nonce = ''; + if (window.liteYouTubeNonce) { + nonce = `nonce="${window.liteYouTubeNonce}"`; + } shadowDom.innerHTML = ` -