mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
No ticket. Use data_priv methods instead of jQuery._removeData and jQuery._data; Remove needless, internal second argument of jQuery.cleanData. Closes gh-1234
This commit is contained in:
committed by
Rick Waldron
parent
1a3939659b
commit
e8731410a4
13
src/queue.js
13
src/queue.js
@@ -4,12 +4,12 @@ jQuery.extend({
|
||||
|
||||
if ( elem ) {
|
||||
type = ( type || "fx" ) + "queue";
|
||||
queue = jQuery._data( elem, type );
|
||||
queue = data_priv.get( elem, type );
|
||||
|
||||
// Speed up dequeue by getting out quickly if this is just a lookup
|
||||
if ( data ) {
|
||||
if ( !queue || jQuery.isArray(data) ) {
|
||||
queue = jQuery._data( elem, type, jQuery.makeArray(data) );
|
||||
if ( !queue || jQuery.isArray( data ) ) {
|
||||
queue = data_priv.access( elem, type, jQuery.makeArray(data) );
|
||||
} else {
|
||||
queue.push( data );
|
||||
}
|
||||
@@ -57,10 +57,9 @@ jQuery.extend({
|
||||
// not intended for public consumption - generates a queueHooks object, or returns the current one
|
||||
_queueHooks: function( elem, type ) {
|
||||
var key = type + "queueHooks";
|
||||
return jQuery._data( elem, key ) || jQuery._data( elem, key, {
|
||||
return data_priv.get( elem, key ) || data_priv.access( elem, key, {
|
||||
empty: jQuery.Callbacks("once memory").add(function() {
|
||||
jQuery._removeData( elem, type + "queue" );
|
||||
jQuery._removeData( elem, key );
|
||||
data_priv.remove( elem, [ type + "queue", key ] );
|
||||
})
|
||||
});
|
||||
}
|
||||
@@ -135,7 +134,7 @@ jQuery.fn.extend({
|
||||
type = type || "fx";
|
||||
|
||||
while( i-- ) {
|
||||
tmp = jQuery._data( elements[ i ], type + "queueHooks" );
|
||||
tmp = data_priv.get( elements[ i ], type + "queueHooks" );
|
||||
if ( tmp && tmp.empty ) {
|
||||
count++;
|
||||
tmp.empty.add( resolve );
|
||||
|
||||
Reference in New Issue
Block a user