Side navigation
#11675 closed bug (patchwelcome)
Opened April 30, 2012 11:21PM UTC
Closed May 03, 2012 08:33PM UTC
.add method in IE breaks when pass an HTMLCollection
Reported by: | jstrimpel@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When form.elements is passed to .add() in IE it has a a nodeType of 1, so add() treats it as a single DOM element not a collection of DOM elements. When it treats it as a single DOM element .add() wraps the collection in an array. The end result is an array containng one item which is an array like object (HTMLCollection). See it in action, http://jsfiddle.net/w7qNc/2/.
Minor correction, IE8. I haven't tested earlier versions of IE. IE9 seems to be OK.