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: | 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
comment:3 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
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.
I forgot to mention that 2.x gets this right.