Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 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:

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

Change History (2)

comment:1 Changed 11 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!

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

comment:2 Changed 11 years ago by addyosmani

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