Skip to main content

Bug Tracker

Side navigation

#2522 closed enhancement (fixed)

Opened March 15, 2008 01:38PM UTC

Closed April 22, 2008 05:27AM UTC

Remove isFunction from jQuery.event.trigger

Reported by: spinal007 Owned by:
Priority: major Milestone: 1.2.4
Component: event Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

In jQuery.event.trigger:

if ( jQuery.isFunction(, "handle") ) )

val =, "handle").apply( elem, data );

Problem 1:

That's 2 calls to and one possibly useless call to


Problem 2:

Is it really necessary to check if, "handle") is a function ? what else could it be?

Proposed change:

var handle =, "handle");

if(handle) val = handle.apply( elem, data );

Attachments (0)
Change History (2)

Changed March 17, 2008 11:43PM UTC by flesler comment:1

This proposal was made by me here:

It's not a genius invention, but you should mention that anyway, I think. Also linking to the original discussion thread is usually good for the devs.

Changed April 22, 2008 05:27AM UTC by brandon comment:2

resolution: → fixed
status: newclosed

Applied in Rev [5276]