]> source.dussan.org Git - jquery.git/commitdiff
Make sure that we don't try to trigger non-existant native events on applets, embed...
authorJohn Resig <jeresig@gmail.com>
Wed, 9 Dec 2009 22:49:31 +0000 (14:49 -0800)
committerJohn Resig <jeresig@gmail.com>
Wed, 9 Dec 2009 22:49:31 +0000 (14:49 -0800)
src/event.js

index e070cb2619e1a6ab2474af5130ab7fc5c13e4f9c..afe92af595f05ea4d399cf828f434ed22e8d6b77 100644 (file)
@@ -253,8 +253,10 @@ jQuery.event = {
 
                var nativeFn, nativeHandler;
                try {
-                       nativeFn = elem[ type ];
-                       nativeHandler = elem[ "on" + type ];
+                       if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
+                               nativeFn = elem[ type ];
+                               nativeHandler = elem[ "on" + type ];
+                       }
                // prevent IE from throwing an error for some elements with some event types, see #3533
                } catch (e) {}