Skip to main content

Bug Tracker

Side navigation

#9666 closed bug (patchwelcome)

Opened June 25, 2011 12:56AM UTC

Closed June 25, 2011 03:17AM UTC

Last modified June 28, 2011 05:18AM UTC

Cannot detect when an IFRAME has finished loading with .delegate and .live

Reported by: cjoudrey Owned by:
Priority: low Milestone: 1.next
Component: event Version: 1.6.1
Keywords: neededdocs Cc:
Blocked by: Blocking:
Description

Detecting when an IFRAME has finished loading can be done using .load(), but .live('load', ..) and .delegate('...', 'load', ...) do not seem to work.

Test case: http://jsfiddle.net/AYY8m/1/

  • Chris
Attachments (0)
Change History (2)

Changed June 25, 2011 03:17AM UTC by dmethvin comment:1

component: unfiledevent
keywords: → needsdocs
priority: undecidedlow
resolution: → patchwelcome
status: newclosed

Sounds like we'll just need to document this: "The .live() and .delegate() methods cannot be used to detect the load event of an iframe."

The load event doesn't bubble up to the parent document, and the event.target isn't set by Firefox, IE9, or Chrome which we need to be able to do event delegation anyway. In Chrome the frame load event even fires *after* the parent document load, which was unexpected to me!

http://jsfiddle.net/dmethvin/AYY8m/2/

Changed June 28, 2011 05:18AM UTC by addyosmani comment:2

keywords: needsdocsneededdocs