Skip to content

Instantly share code, notes, and snippets.

@matijs
Created June 23, 2016 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matijs/9ddd326d2695f22e0c73a17ebd070757 to your computer and use it in GitHub Desktop.
Save matijs/9ddd326d2695f22e0c73a17ebd070757 to your computer and use it in GitHub Desktop.
Helper function to return querySelectorAll results as an array
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