Bug Tracker

Modify

Ticket #2706 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

$("iframe").contents().width() throws exception

Reported by: telega Owned by:
Priority: low Milestone: 1.2.4
Component: attributes Version: 1.2.3
Keywords: Cc:
Blocking: Blocked by:

Description

Code $("iframe").contents().width() throws exception in Opera & Firefox and returns NaN in IE.

<script src="jquery.js"></script>
<script>
  $(document).ready(function() {
    try {
      var width = $("iframe").contents().width();
      alert(width);
    }
    catch(e) { alert(e); }
  });
</script>

<iframe></iframe>

Change History

comment:1 Changed 3 years ago by rwaldron

  • Priority changed from minor to low
  • Resolution set to fixed
  • Status changed from new to closed
  • Component changed from core to attributes

Tested in all offending browsers listed above - this issue no longer exists:

 http://jsfiddle.net/rwaldron/hqA8u/

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.