Modify ↓
Ticket #2411 (closed enhancement: invalid)
$.removeData could return the data
| Reported by: | klaus | Owned by: | klaus |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.2.4 |
| Component: | data | Version: | 1.2.3 |
| Keywords: | data | Cc: | |
| Blocking: | Blocked by: |
Description
It would be handy if $.removeData would return the data that is being removed.
Instead of
var data = $.data(el, 'data'); $.removeData(el, 'data');
it seems more intuitive (and less to type) to have:
var data = $.removeData(el, 'data');
Attachments
Change History
Changed 5 years ago by flesler
-
attachment
removeData.diff
added
comment:2 Changed 3 years ago by rwaldron
- Owner set to klaus
- Status changed from new to pending
Thanks for taking the time to contribute to the jQuery project! Please provide a jsFiddle that outlines practical use cases for your enhancement request.
Additionally, test against the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!
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.

These are the necessary changes