Skip to content

Commit 1960f28

Browse files
committed
Make sure no exception is thrown if no event handler is found (which is the case for applets, objects, and embeds).
1 parent 05aaa33 commit 1960f28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/event.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jQuery.event = {
5757
handle = jQuery.data( elem, "handle", eventHandle );
5858
}
5959

60+
// If no handle is found then we must be trying to bind to one of the
61+
// banned noData elements
62+
if ( !handle ) {
63+
return;
64+
}
65+
6066
// Add elem as a property of the handle function
6167
// This is to prevent a memory leak with non-native
6268
// event in IE.

0 commit comments

Comments
 (0)