aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-01-13 11:24:54 -0500
committerjeresig <jeresig@gmail.com>2010-01-13 11:24:54 -0500
commit1960f28c0bf75b16e88460d6135058fd93202322 (patch)
tree51bc7aaca0fa0e0b1d6eefafc7685e0799801ca4 /src
parent05aaa3395723bbb48906ee8a99464a2c4e1e4193 (diff)
downloadjquery-1960f28c0bf75b16e88460d6135058fd93202322.tar.gz
jquery-1960f28c0bf75b16e88460d6135058fd93202322.zip
Make sure no exception is thrown if no event handler is found (which is the case for applets, objects, and embeds).
Diffstat (limited to 'src')
-rw-r--r--src/event.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/event.js b/src/event.js
index 02349984a..c826f17b1 100644
--- a/src/event.js
+++ b/src/event.js
@@ -57,6 +57,12 @@ jQuery.event = {
handle = jQuery.data( elem, "handle", eventHandle );
}
+ // If no handle is found then we must be trying to bind to one of the
+ // banned noData elements
+ if ( !handle ) {
+ return;
+ }
+
// Add elem as a property of the handle function
// This is to prevent a memory leak with non-native
// event in IE.