aboutsummaryrefslogtreecommitdiffstats
path: root/src/queue.js
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2024-01-22 22:13:23 -0500
committerGitHub <noreply@github.com>2024-01-22 22:13:23 -0500
commit805cdb43fd02c3a5783c06b5ec2c9519be0682ab (patch)
treee5a914f0b1ddf5cd18e37d3310b1afe438bdd31a /src/queue.js
parentaf79c99939628255f46f30bced000eba9aa6711f (diff)
downloadjquery-805cdb43fd02c3a5783c06b5ec2c9519be0682ab.tar.gz
jquery-805cdb43fd02c3a5783c06b5ec2c9519be0682ab.zip
Data: Refactor to reduce size
* Return the new value from `set(owner, key, value)`. * Use `set(owner, key, value)` rather than `access(owner, key, value)`. Close gh-5392
Diffstat (limited to 'src/queue.js')
-rw-r--r--src/queue.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/queue.js b/src/queue.js
index 3621eaf45..306dbcff8 100644
--- a/src/queue.js
+++ b/src/queue.js
@@ -15,7 +15,7 @@ jQuery.extend( {
// Speed up dequeue by getting out quickly if this is just a lookup
if ( data ) {
if ( !queue || Array.isArray( data ) ) {
- queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
+ queue = dataPriv.set( elem, type, jQuery.makeArray( data ) );
} else {
queue.push( data );
}
@@ -62,7 +62,7 @@ jQuery.extend( {
// Not public - generate a queueHooks object, or return the current one
_queueHooks: function( elem, type ) {
var key = type + "queueHooks";
- return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
+ return dataPriv.get( elem, key ) || dataPriv.set( elem, key, {
empty: jQuery.Callbacks( "once memory" ).add( function() {
dataPriv.remove( elem, [ type + "queue", key ] );
} )