In YUI 3.1 HTML Parser overrides passed in Attrs

This example is using YUI 3.1, view the 3.0 version here

  1. Item 1 (has css class of item)
  2. Item 2 (has css class of item)
  3. Item 3
  4. Item 4

In YUI 3.0 the count above comes out as:
Found 4 items
Found 2 items

The first instance of the counter uses the HTML_PARSER and grabs all 4 list items. The second counter instance is passed in the the two elements with the 'item' css class on them but the HTML_PARSER is still run overriding the passed in value. In 3.0 the passed in value wasn't over written by the HTML_PARSER value but in 3.1 it is.