From: Akintayo Akinwunmi Date: Tue, 16 Oct 2012 13:51:01 +0000 (-0400) Subject: Moved attrFN to deprecated. Close gh-977. X-Git-Tag: 1.9.0b1~202 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=78617f067a0e03d9fe9aad135bbdfba880ddf968;p=jquery.git Moved attrFN to deprecated. Close gh-977. --- diff --git a/src/attributes.js b/src/attributes.js index 76aed2996..5a6749982 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -276,10 +276,7 @@ jQuery.extend({ } }, - // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 - attrFn: {}, - - attr: function( elem, name, value, pass ) { + attr: function( elem, name, value, pass ) { var ret, hooks, notxml, nType = elem.nodeType; diff --git a/src/deprecated.js b/src/deprecated.js index 241eb2a81..4ea47b333 100644 --- a/src/deprecated.js +++ b/src/deprecated.js @@ -60,6 +60,9 @@ jQuery.sub = function() { return jQuerySub; }; +// Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 +jQuery.attrFn = {}; + var oldToggle = jQuery.fn.toggle; jQuery.fn.toggle = function( fn, fn2 ) { diff --git a/test/unit/deprecated.js b/test/unit/deprecated.js index 48c3bda18..f5787e518 100644 --- a/test/unit/deprecated.js +++ b/test/unit/deprecated.js @@ -101,4 +101,10 @@ if ( jQuery.browser ) { // manually clean up detached elements $div.remove(); }); + + test("attrFn test", function() { + expect(1); + ok(!!jQuery.attrFn, "attrFnPresent"); + }); + }