- From: guest271314 <notifications@github.com>
- Date: Tue, 03 Apr 2018 00:19:08 +0000 (UTC)
- To: whatwg/fullscreen <fullscreen@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 3 April 2018 00:19:41 UTC
You can include `<style>` element within Shadow DOM to achieve the same result ``` let d = document.querySelector('#parent'); let shadowRoot = d.attachShadow({ mode: 'open' }); let style = document.createElement("style"); style.textContent = `::backdrop { --bg-color: blue; } dialog::backdrop { background-color: var(--bg-color); }`; let child = document.createElement('dialog'); child.textContent = 'foo'; shadowRoot.appendChild(style); shadowRoot.appendChild(child); let b = document.querySelector('button'); b.addEventListener('click', () => { child.showModal(); }); ``` https://jsfiddle.net/062m2fhv/5/ -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fullscreen/issues/124#issuecomment-378088350
Received on Tuesday, 3 April 2018 00:19:41 UTC