Last active
March 1, 2017 12:53
-
-
Save zwacky/c41a5725d8ae8d97a17bff0bae566841 to your computer and use it in GitHub Desktop.
DOM manipulation without explicitly checking if they exist already in the 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
// less error prone DOM manipulation | |
[].filter.call([document.querySelector('.single-selected-class')], item => item) | |
.forEach(item => item.blur()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment