Commit 3ec2f1ae authored by John Resig's avatar John Resig

Make sure that we don't try to trigger non-existant native events on applets,...

Make sure that we don't try to trigger non-existant native events on applets, embed, objects, etc. as it'll cause an exception with Java applets. Fixes #2414.
parent 1052792b
...@@ -253,8 +253,10 @@ jQuery.event = { ...@@ -253,8 +253,10 @@ jQuery.event = {
var nativeFn, nativeHandler; var nativeFn, nativeHandler;
try { try {
nativeFn = elem[ type ]; if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
nativeHandler = elem[ "on" + type ]; nativeFn = elem[ type ];
nativeHandler = elem[ "on" + type ];
}
// prevent IE from throwing an error for some elements with some event types, see #3533 // prevent IE from throwing an error for some elements with some event types, see #3533
} catch (e) {} } catch (e) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment