Retrieve all elements that have data-foo Javascript
<p>Is there an easy way to get all elements by <code>data-foo</code> (a specific data- attribute name) like <code>getElementsByTagName</code> or <code>getElementsByClassName</code> thanks.</p>

<p><em><strong>Note</strong>: I am not using a JS library.</em></p>
