]> source.dussan.org Git - jquery.git/commitdiff
Ref cc324abf: use acceptData to determine when it is safe to add event handlers
authorRichard Gibson <richard.gibson@gmail.com>
Wed, 16 Jan 2013 19:36:24 +0000 (14:36 -0500)
committerRichard Gibson <richard.gibson@gmail.com>
Wed, 16 Jan 2013 19:36:24 +0000 (14:36 -0500)
src/event.js

index 0a85bf43c40fe242bdbb4dddaa1c4605e4eda6f4..6dd8d4a79752b0c9556a076223f776ab43f559cb 100644 (file)
@@ -24,9 +24,9 @@ jQuery.event = {
                var handleObjIn, eventHandle, tmp,
                        events, t, handleObj,
                        special, handlers, type, namespaces, origType,
-                       // Don't attach events to noData or text/comment nodes (but allow plain objects)
-                       elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem );
+                       elemData = jQuery._data( elem );
 
+               // Don't attach events to noData or text/comment nodes (but allow plain objects)
                if ( !elemData ) {
                        return;
                }