aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/attributes.js
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-05-16 10:17:50 -0400
committertimmywil <tim.willison@thisismedium.com>2011-05-16 10:17:50 -0400
commita5cf257a8a240f96f1ec255599fa1d1190f51ff5 (patch)
tree9658f1fb88300f37f0bb1702daa0ebbbf7be0645 /test/unit/attributes.js
parent6171e0a923c4775d0b5e560900f397c33b6341d9 (diff)
downloadjquery-a5cf257a8a240f96f1ec255599fa1d1190f51ff5.tar.gz
jquery-a5cf257a8a240f96f1ec255599fa1d1190f51ff5.zip
Use getAttributeNode for ^on attributes in IE6/7 to avoid anonymous function wrapper. Fixes #9298.
Diffstat (limited to 'test/unit/attributes.js')
-rw-r--r--test/unit/attributes.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 8f2eb7237..9ecf2360b 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -40,7 +40,7 @@ test("jQuery.attrFix/jQuery.propFix integrity test", function() {
});
test("attr(String)", function() {
- expect(39);
+ expect(40);
equals( jQuery("#text1").attr("type"), "text", "Check for type attribute" );
equals( jQuery("#radio1").attr("type"), "radio", "Check for type attribute" );
@@ -119,7 +119,10 @@ test("attr(String)", function() {
ok( jQuery().attr("doesntexist") === undefined, "Make sure undefined is returned when no element is there." );
var $form = jQuery("<form class='something'></form>").appendTo("#qunit-fixture");
- equal( $form.attr("class"), "something", "Retrieve the class attribute on a form" );
+ equal( $form.attr("class"), "something", "Retrieve the class attribute on a form." );
+
+ var $a = jQuery("<a href='#' onclick='something()'>Click</a>").appendTo("#qunit-fixture");
+ equal( $a.attr("onclick"), "something()", "Retrieve ^on attribute without anonymous function wrapper." );
});
if ( !isLocal ) {