Permalink
Browse files

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

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
  • Loading branch information...
markelog committed Apr 30, 2015
1 parent 225bde3 commit fac67a984268ef8f7de952666fda6d8d32754f5f
Showing with 0 additions and 16 deletions.
  1. +0 −2 src/event.js
  2. +0 −14 test/unit/event.js
View
@@ -819,8 +819,6 @@ jQuery.fn.extend({
}
if ( fn === false ) {
fn = returnFalse;
} else if ( !fn ) {
return this;
}
if ( one === 1 ) {
View
@@ -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);

0 comments on commit fac67a9

Please sign in to comment.