mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Revert "Event: remove guard for falsy handler argument of jQuery#on method"
This reverts commit fac67a9842
.
This commit is contained in:
parent
fea7da7ea2
commit
0ee94bcb9d
@ -5,6 +5,21 @@ QUnit.module( "event", {
|
||||
teardown: moduleTeardown
|
||||
} );
|
||||
|
||||
QUnit.test( "null or undefined handler", function( assert ) {
|
||||
assert.expect( 2 );
|
||||
|
||||
// Supports Fixes bug #7229
|
||||
try {
|
||||
jQuery( "#firstp" ).on( "click", null );
|
||||
ok( true, "Passing a null handler will not throw an exception" );
|
||||
} catch ( e ) {}
|
||||
|
||||
try {
|
||||
jQuery( "#firstp" ).on( "click", undefined );
|
||||
ok( true, "Passing an undefined handler will not throw an exception" );
|
||||
} catch ( e ) {}
|
||||
} );
|
||||
|
||||
QUnit.test( "on() with non-null,defined data", function( assert ) {
|
||||
assert.expect( 2 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user