We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fea7da7 commit 0ee94bcCopy full SHA for 0ee94bc
test/unit/event.js
@@ -5,6 +5,21 @@ QUnit.module( "event", {
5
teardown: moduleTeardown
6
} );
7
8
+QUnit.test( "null or undefined handler", function( assert ) {
9
+ assert.expect( 2 );
10
+
11
+ // Supports Fixes bug #7229
12
+ try {
13
+ jQuery( "#firstp" ).on( "click", null );
14
+ ok( true, "Passing a null handler will not throw an exception" );
15
+ } catch ( e ) {}
16
17
18
+ jQuery( "#firstp" ).on( "click", undefined );
19
+ ok( true, "Passing an undefined handler will not throw an exception" );
20
21
+} );
22
23
QUnit.test( "on() with non-null,defined data", function( assert ) {
24
assert.expect( 2 );
25
0 commit comments