aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/event.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/event.js b/src/event.js
index ffaec578d..3f1c5f31a 100644
--- a/src/event.js
+++ b/src/event.js
@@ -120,6 +120,11 @@ jQuery.event = {
selector = handleObjIn.selector;
}
+ // If the selector is invalid, throw any exceptions at attach time
+ if ( selector ) {
+ jQuery.find( selector, elem );
+ }
+
// Make sure that the handler has a unique ID, used to find/remove it later
if ( !handler.guid ) {
handler.guid = jQuery.guid++;