Skip to content
Permalink
Browse files

jquery event: Removed a needless if (old code)

  • Loading branch information
flesler committed Jan 5, 2009
1 parent 0c16532 commit 42c99472cc5718d90a129f6ebb10ea45d5816418
Showing with 9 additions and 11 deletions.
  1. +9 −11 src/event.js
@@ -163,7 +163,8 @@ jQuery.event = {
}
},

trigger: function( event, data, elem, bubbling /* internal */ ) {
// bubbling is internal
trigger: function( event, data, elem, bubbling ) {
// Event object or event type
var type = event.type || event;

@@ -199,16 +200,13 @@ jQuery.event = {
if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
return undefined;

// AT_TARGET phase (not bubbling)
if( !bubbling ){
// Clean up in case it is reused
event.result = undefined;
event.target = elem;

// Clone the incoming data, if any
data = jQuery.makeArray(data);
data.unshift( event );
}
// Clean up in case it is reused
event.result = undefined;
event.target = elem;

// Clone the incoming data, if any
data = jQuery.makeArray(data);
data.unshift( event );
}

event.currentTarget = elem;

0 comments on commit 42c9947

Please sign in to comment.
You can’t perform that action at this time.