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.
This commit is contained in:
parent
1052792bb2
commit
3ec2f1aef6
1 changed files with 4 additions and 2 deletions
|
@ -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) {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue