Skip to main content

Bug Tracker

Side navigation

#2706 closed bug (fixed)

Opened April 17, 2008 07:06PM UTC

Closed October 25, 2010 11:29PM UTC

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

Reported by: telega Owned by:
Priority: low Milestone: 1.2.4
Component: attributes Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:
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>
Attachments (0)
Change History (1)

Changed October 25, 2010 11:29PM UTC by rwaldron comment:1

component: coreattributes
priority: minorlow
resolution: → fixed
status: newclosed

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

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