Bug Tracker

Opened 9 years ago

Closed 9 years ago

#14898 closed bug (notabug)

jQuery 1.x doesn't support embed load events, while 2.x does

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0-rc1
Keywords: Cc:
Blocked by: Blocking:

Description

jQuery 1.x doesn't support setting load events on <embed> elements, which causes problems when trying to embed svg, on which one needs to wait on the load to interact with from js.

Here's a jsfiddle to illustrate the problem, switch out the jQuery library versions to see the problem: http://jsfiddle.net/v7nC7/

Change History (3)

comment:1 Changed 9 years ago by anonymous

I forgot to mention that 2.x gets this right.

comment:3 Changed 9 years ago by dmethvin

Resolution: notabug
Status: newclosed

We can't reliably attach data to embed elements in IE<8. The docs say:

Due to the way browsers interact with plugins and external code, the .data() method cannot be used on <object> (unless it's a Flash plugin), <applet> or <embed> elements.

If you want that to work cross-browser, use jQuery 2.x where all supported browsers can do the job.

Note: See TracTickets for help on using tickets.