Skip to content
Permalink
Browse files
Add note about deprecation of _removeData and _data
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Apr 8, 2013
1 parent d7d6b7a commit 570ec3dec7ceaef1f24693499867dfaf7c083c5c
Showing 1 changed file with 2 additions and 7 deletions.
@@ -211,13 +211,8 @@ jQuery.extend({
data_user.remove( elem, name );
},

// TODO: Replace all calls to _data and _removeData with direct
// calls to
//
// data_priv.access( elem, name, data );
//
// data_priv.remove( elem, name );
//
// TODO: Now that all calls to _data and _removeData have been replaced
// with direct calls to data_priv methods, these can be deprecated.
_data: function( elem, name, data ) {
return data_priv.access( elem, name, data );
},

5 comments on commit 570ec3d

@timmywil
Copy link
Member

@timmywil timmywil commented on 570ec3d Apr 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we agreed to deprecate those? I don't think they should be deprecated until we have a replacement for $._data( elem, "events" ). It's still useful, even though it's private.

@rwaldron
Copy link
Member Author

@rwaldron rwaldron commented on 570ec3d Apr 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't agreed on anything, or even discussed it. This is me declaring war on them.

Also, $._data( elem, "events" ) is not a thing we owe anyone a replacement for...

@timmywil
Copy link
Member

@timmywil timmywil commented on 570ec3d Apr 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you suggest viewing the events currently bound on an element, which is absolutely necessary and useful?

@timmywil
Copy link
Member

@timmywil timmywil commented on 570ec3d Apr 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At one point, it was suggested to have a $.events interface for it, instead of using $._data.

@rwaldron
Copy link
Member Author

@rwaldron rwaldron commented on 570ec3d Apr 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree, but I'd like to politely suggest tabling this discussion because it's not worth having a long drawn out argument on github.

Please sign in to comment.