Created
February 12, 2019 16:16
-
-
Save csmr/435e3dd3cd6e954d9c4093be36cc7bb6 to your computer and use it in GitHub Desktop.
[js] Deleting stylesheets from DOM
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
var list = doc.querySelectorAll('link[rel=stylesheet]'); | |
// Remove all stylesheet references | |
list.forEach( el => { | |
el.parentNode.removeChild(el); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment