File tree Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -167,11 +167,6 @@ jQuery.extend({
167
167
168
168
delete thisCache [ name ] ;
169
169
170
- // Check the actual element for predefined data-* attrs, #10027
171
- if ( jQuery . attr ( elem , "data-" + name ) ) {
172
- jQuery . removeAttr ( elem , "data-" + name ) ;
173
- }
174
-
175
170
// If there is no data left in the cache, we want to continue
176
171
// and let the cache object itself get destroyed
177
172
if ( ! isEmptyDataObject ( thisCache ) ) {
Original file line number Diff line number Diff line change @@ -568,7 +568,7 @@ test("jQuery.data supports interoperable removal of hyphenated/camelCase propert
568
568
"some-json" : '{ "foo": "bar" }'
569
569
} ;
570
570
571
- expect ( 29 ) ;
571
+ expect ( 27 ) ;
572
572
573
573
jQuery . each ( datas , function ( key , val ) {
574
574
div . data ( key , val ) ;
@@ -581,15 +581,4 @@ test("jQuery.data supports interoperable removal of hyphenated/camelCase propert
581
581
equal ( div . data ( key ) , undefined , "get: " + key ) ;
582
582
583
583
} ) ;
584
-
585
- div . remove ( ) ;
586
-
587
- // Covers #10027
588
- div = jQuery ( "<div data-msg='hello'></div>" ) ;
589
-
590
- equal ( div . data ( "msg" ) , "hello" , "<div data-msg='hello'></div> has expected data" ) ;
591
-
592
- div . removeData ( "msg" ) ;
593
-
594
- equal ( div . data ( "msg" ) , undefined , "data-msg removed correctly" ) ;
595
584
} ) ;
You can’t perform that action at this time.
0 commit comments