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
}
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.
}
// If not, register one
- return this.register( owner, initial );
+ return this.register( owner );
},
set: function( owner, data, value ) {
var prop,
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 ];
- }
}
};