]> source.dussan.org Git - jquery.git/commitdiff
Remove deleteExpando detect.
authorDave Methvin <dave.methvin@gmail.com>
Thu, 3 Jan 2013 01:53:33 +0000 (20:53 -0500)
committerDave Methvin <dave.methvin@gmail.com>
Fri, 4 Jan 2013 01:55:52 +0000 (20:55 -0500)
src/support.js
test/unit/data.js

index 114c1c31b5464a69e77134d4153728ed3d666aa0..abe7c1bfe2e56cda42246587f1616bea0901e847 100644 (file)
@@ -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";
index c09149b65e34e73c309f86e1c0b9c9d7100e1c31..6d1d856f5cb30221378924fd2b47ffac15bc8b95 100644 (file)
@@ -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);