Skip to content
Permalink
Browse files

Remove deleteExpando detect.

  • Loading branch information...
dmethvin committed Jan 3, 2013
1 parent aa52969 commit 11e6a6600255932fa790720899e9e6ffc3a8d5f3
Showing with 0 additions and 42 deletions.
  1. +0 −8 src/support.js
  2. +0 −34 test/unit/data.js
@@ -36,7 +36,6 @@ jQuery.support = (function() {
boxModel: document.compatMode === "CSS1Compat",

// Will be defined later
deleteExpando: true,
noCloneEvent: true,
reliableMarginRight: true,
boxSizingReliable: true,
@@ -52,13 +51,6 @@ jQuery.support = (function() {
select.disabled = true;
support.optDisabled = !opt.disabled;

// Support: IE<9
try {
delete div.test;
} catch( e ) {
support.deleteExpando = false;
}

// Check if an input maintains its value after becoming a radio
input = document.createElement("input");
input.value = "t";
@@ -99,40 +99,6 @@ test("jQuery.data(document)", 25, function() {
QUnit.expectJqData(document, "foo");
});

test("Expando cleanup", 4, function() {
var expected, actual,
div = document.createElement("div");

function assertExpandoAbsent(message) {
if (jQuery.support.deleteExpando) {
expected = false;
actual = jQuery.expando in div;
} else {
expected = null;
actual = div[ jQuery.expando ];
}
equal( actual, expected, message );
}

assertExpandoAbsent("There is no expando on new elements");

jQuery.data(div, "foo", 100);
jQuery.data(div, "bar", 200);

ok(jQuery.expando in div, "There is an expando on the element after using $.data()");

jQuery.removeData(div, "foo");

ok(jQuery.expando in div, "There is still an expando on the element after removing (some) of the data");

jQuery.removeData(div, "bar");

assertExpandoAbsent("Removing the last item in the data store deletes the expando");

// Clean up unattached element
jQuery(div).remove();
});

test("jQuery.acceptData", function() {
expect(7);

0 comments on commit 11e6a66

Please sign in to comment.
You can’t perform that action at this time.