From 78617f067a0e03d9fe9aad135bbdfba880ddf968 Mon Sep 17 00:00:00 2001 From: Akintayo Akinwunmi Date: Tue, 16 Oct 2012 09:51:01 -0400 Subject: [PATCH] Moved attrFN to deprecated. Close gh-977. --- src/attributes.js | 5 +---- src/deprecated.js | 3 +++ test/unit/deprecated.js | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) 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"); + }); + }