Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9666 closed bug (patchwelcome)

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:


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

Change History (2)

comment:1 Changed 12 years ago by dmethvin

Component: unfiledevent
Keywords: needsdocs added
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!


comment:2 Changed 12 years ago by addyosmani

Keywords: neededdocs added; needsdocs removed
Note: See TracTickets for help on using tickets.