Event: remove guard for falsy handler argument of jQuery#on method

(cherry-picked from fac67a9842)

Since we don't have this in off method and its a common perception
that this is a rudiment code

Ref gh-2248
Closes gh-2249
This commit is contained in:
Oleg Gaidarenko 2015-04-30 20:05:18 +03:00
parent fb25bacf9b
commit 1a067a49d1
2 changed files with 0 additions and 16 deletions

View File

@ -1002,8 +1002,6 @@ jQuery.fn.extend({
}
if ( fn === false ) {
fn = returnFalse;
} else if ( !fn ) {
return this;
}
if ( one === 1 ) {

View File

@ -5,20 +5,6 @@ module( "event", {
teardown: moduleTeardown
});
test("null or undefined handler", function() {
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 ) {}
});
test("on() with non-null,defined data", function() {
expect(2);