Opened 11 years ago
Closed 11 years ago
#11675 closed bug (patchwelcome)
.add method in IE breaks when pass an HTMLCollection
Reported by: | 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/.
Change History (2)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Minor correction, IE8. I haven't tested earlier versions of IE. IE9 seems to be OK.