From: Dave Methvin Date: Thu, 3 Jan 2013 01:53:33 +0000 (-0500) Subject: Remove deleteExpando detect. X-Git-Tag: 2.0.0b1~44 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=11e6a6600255932fa790720899e9e6ffc3a8d5f3;p=jquery.git Remove deleteExpando detect. --- diff --git a/src/support.js b/src/support.js index 114c1c31b..abe7c1bfe 100644 --- a/src/support.js +++ b/src/support.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"; diff --git a/test/unit/data.js b/test/unit/data.js index c09149b65..6d1d856f5 100644 --- a/test/unit/data.js +++ b/test/unit/data.js @@ -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);