Bug Tracker

Modify

Ticket #2411 (closed enhancement: invalid)

Opened 5 years ago

Last modified 2 years ago

$.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

removeData.diff Download (726 bytes) - added by flesler 5 years ago.
These are the necessary changes

Change History

Changed 5 years ago by flesler

These are the necessary changes

comment:1 Changed 3 years ago by dmethvin

  • Component changed from core to data

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!

comment:3 Changed 2 years ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

Automatically closed due to 14 days of inactivity.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.