Created
February 11, 2021 22:59
-
-
Save joshkitt/445f02364cfd7dca7d443925a5cb1861 to your computer and use it in GitHub Desktop.
Shadow dom css override
This file contains 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
(function shadowLoop () { | |
var host = document.getElementsByTagName('host-element-containing-shadow-root)[0]; | |
if (!host) { | |
setTimeout(shadowLoop, 500); | |
} else { | |
var style = document.createElement('style'); | |
style.innerHTML = '#SomeID {display: none !important}'; | |
host.shadowRoot.appendChild(style); | |
} | |
} ()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment