Modify ↓
Ticket #5354 (closed bug: invalid)
$(iframe).contents() not returning document element for IE8
| Reported by: | tyson-benson | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.4 |
| Component: | core | Version: | 1.3.2 |
| Keywords: | iframe,contents | Cc: | |
| Blocking: | Blocked by: |
Description (last modified by dmethvin) (diff)
I was using the .contents() function to return the DispHTMLDocument, however in IE8 the elem.contentWindow.document did not exist in the DispHTMLWindow2 object.
The problem lies on line 1186:
contents: function(elem){
return jQuery.nodeName(elem,"iframe")?
elem.contentDocument || elem.contentWindow.document:
jQuery.makeArray(elem.childNodes);
}
Perhaps it should be like this:
contents: function(elem){
return jQuery.nodeName(elem,"iframe")?
elem.contentDocument || elem.contentWindow.document || elem.document :
jQuery.makeArray(elem.childNodes);
}
Attachments
Change History
Changed 4 years ago by tyson-benson
-
attachment
jquery-iframe_contents.png
added
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

IE Developer Toolbar