aboutsummaryrefslogtreecommitdiffstats
path: root/src/data/Data.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-05-06 15:28:38 -0700
committerTimmy Willison <timmywillisn@gmail.com>2015-05-12 10:09:40 -0400
commit764dc949d0d65742606747ce75852d1b5dd59fcd (patch)
tree240323bf61b2c1bf6239e3c6dc0c44f8d0ef8d78 /src/data/Data.js
parent16713fb6097849727de2ba1b489c98e242a168c3 (diff)
downloadjquery-764dc949d0d65742606747ce75852d1b5dd59fcd.tar.gz
jquery-764dc949d0d65742606747ce75852d1b5dd59fcd.zip
Data: remove some unused code
Diffstat (limited to 'src/data/Data.js')
-rw-r--r--src/data/Data.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/data/Data.js b/src/data/Data.js
index 337b0456b..d56e37839 100644
--- a/src/data/Data.js
+++ b/src/data/Data.js
@@ -13,8 +13,8 @@ Data.accepts = jQuery.acceptData;
Data.prototype = {
- register: function( owner, initial ) {
- var value = initial || {};
+ register: function( owner ) {
+ var value = {};
// If it is a node unlikely to be stringify-ed or looped over
// use plain assignment
@@ -33,7 +33,7 @@ Data.prototype = {
}
return owner[ this.expando ];
},
- cache: function( owner, initial ) {
+ cache: function( owner ) {
// We can accept data for non-element nodes in modern browsers,
// but we should not, see #8335.
@@ -51,7 +51,7 @@ Data.prototype = {
}
// If not, register one
- return this.register( owner, initial );
+ return this.register( owner );
},
set: function( owner, data, value ) {
var prop,
@@ -151,11 +151,6 @@ Data.prototype = {
hasData: function( owner ) {
var cache = owner[ this.expando ];
return cache !== undefined && !jQuery.isEmptyObject( cache );
- },
- discard: function( owner ) {
- if ( owner[ this.expando ] ) {
- delete owner[ this.expando ];
- }
}
};