Created
May 2, 2018 15:26
-
-
Save tonis2/7a6fce0e37982e50b0034a5742129abb to your computer and use it in GitHub Desktop.
Add style to shadow dom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addStyle(sheet, location) { | |
| const style = document.createElement("style"); | |
| style.type = `text/css`; | |
| style.appendChild(document.createTextNode(sheet)); | |
| location.appendChild(style); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment