How to get elements by attribute selector w/ native JavaScript w/o querySelectorAll
    <p data-foo="bar">

How can you do the equivalent to: 

    document.querySelectorAll('[data-foo]')

where [querySelectorAll][1] is [not available][2]? 

I need a native solution that works at least in IE7. Don't care 'bout IE6.

  [1]: https://developer.mozilla.org/en/DOM/Document.querySelectorAll
  [2]: http://caniuse.com/queryselector
How to get elements by attribute selector w/ native JavaScript w/o querySelectorAll
===

    <p data-foo="bar">

How can you do the equivalent to: 

    document.querySelectorAll('[data-foo]')

where [querySelectorAll][1] is [not available][2]? 

I need a native solution that works at least in IE7. Don't care 'bout IE6.

  [1]: https://developer.mozilla.org/en/DOM/Document.querySelectorAll
  [2]: http://caniuse.com/queryselector