Inspired by the post and comments at http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/
<p id="p1" class="aaa bbb">
<p id="p2" class="aaa ccc">
<p id="p3" class="bbb ccc">
<p id="p4" class="aaa aaa-bbb ccc">
var matches = getElementsByClassName(node, cls, [tag])