We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bec2ba2 commit 0874096Copy full SHA for 0874096
test/unit/data.js
@@ -1121,3 +1121,19 @@ testIframeWithCallback(
1121
);
1122
}
1123
1124
+
1125
+QUnit.test( ".data(prop) does not create expando", function( assert ) {
1126
+ assert.expect( 1 );
1127
1128
+ var key,
1129
+ div = jQuery( "<div/>" );
1130
1131
+ div.data("foo");
1132
+ assert.equal( false, jQuery.hasData( div[0] ) );
1133
+ // Make sure no expando has been added
1134
+ for ( key in div[ 0 ] ) {
1135
+ if ( /^jQuery/.test( key ) ) {
1136
+ assert.ok( false, "Expando was created on access" );
1137
+ }
1138
1139
+} );
0 commit comments