Skip to main content

Bug Tracker

Side navigation

#14898 closed bug (notabug)

Opened March 19, 2014 10:20AM UTC

Closed March 20, 2014 07:01PM UTC

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

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

jQuery 1.x doesn't support setting load events on

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:

Attachments (0)
Change History (3)

Changed March 19, 2014 10:21AM UTC by anonymous comment:1

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

Changed March 19, 2014 10:23AM UTC by comment:2


Changed March 20, 2014 07:01PM UTC by dmethvin comment:3

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.