diff options
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/event.js b/src/event.js index 1e2d33dd6..bfe2dd1af 100644 --- a/src/event.js +++ b/src/event.js @@ -525,10 +525,14 @@ jQuery.event = { var removeEvent = document.removeEventListener ? function( elem, type, handle ) { - elem.removeEventListener( type, handle, false ); + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } } : function( elem, type, handle ) { - elem.detachEvent( "on" + type, handle ); + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } }; jQuery.Event = function( src ) { |