#9815 closed bug (fixed)
$.contains(element, textNode) always throws in IE8
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.6.3 |
Component: | core | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Calling jQuery.contains
with the second parameter being a text node, Internet Explorer 8 throws a "No such interface supported" exception.
The documentation for $.contains
explicitely states that the second parameter can be any type of node; not just elements. So this should work and report whether the node is contained in element given through first parameter.
A test case can be found here: http://jsfiddle.net/JpYCA/
Change History (5)
comment:1 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Component: | unfiled → core |
---|---|
Milestone: | None → 1.next |
Priority: | undecided → low |
comment:3 Changed 12 years ago by
Milestone: | 1.next → 1.6.3 |
---|
Note: See
TracTickets for help on using
tickets.
Confirmed, in IE
a.contains(b)
throws the "No such interface supported" error whena
is a normal DOM element andb
is a text node. I don't believe there is anywhere that core depends onjQuery.contains
for text nodes, so I have updated the documentation.