Modify ↓
Ticket #9803 (closed bug: invalid)
.data() doesn't work on object or embed elements
| Reported by: | chriscoyier@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | data | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
See fiddle: http://jsfiddle.net/chriscoyier/UxW3V/1/
Change History
comment:1 Changed 23 months ago by rwaldron
- Priority changed from undecided to low
- Resolution set to wontfix
- Status changed from new to closed
- Component changed from unfiled to data
comment:2 Changed 23 months ago by rwaldron
- Status changed from closed to reopened
- Resolution wontfix deleted
comment:3 Changed 23 months ago by rwaldron
- Status changed from reopened to closed
- Resolution set to invalid
comment:4 Changed 23 months ago by rwaldron
See also, http://bugs.jquery.com/ticket/1675
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Thanks for contributing to jQuery - this behaviour is actually known, expected and tested.
If you look in the src/data module, you'll find the following:
// The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData: { "embed": true, // Ban all objects except for Flash (which handle expandos) "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "applet": true },It's even documented here:
http://api.jquery.com/data/