Created
June 23, 2016 05:36
-
-
Save matijs/9ddd326d2695f22e0c73a17ebd070757 to your computer and use it in GitHub Desktop.
Helper function to return querySelectorAll results as an array
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 $_( selectors, baseElement ) { | |
var elements = (baseElement || document).querySelectorAll( selectors ); | |
return Array.prototype.slice.call( elements ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment