jquery event: Removed a needless if (old code)
This commit is contained in:
parent
0c1653249a
commit
42c99472cc
1 changed files with 9 additions and 11 deletions
18
src/event.js
18
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
|
// Event object or event type
|
||||||
var type = event.type || event;
|
var type = event.type || event;
|
||||||
|
|
||||||
|
@ -199,16 +200,13 @@ jQuery.event = {
|
||||||
if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
|
if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
||||||
// AT_TARGET phase (not bubbling)
|
// Clean up in case it is reused
|
||||||
if( !bubbling ){
|
event.result = undefined;
|
||||||
// Clean up in case it is reused
|
event.target = elem;
|
||||||
event.result = undefined;
|
|
||||||
event.target = elem;
|
|
||||||
|
|
||||||
// Clone the incoming data, if any
|
// Clone the incoming data, if any
|
||||||
data = jQuery.makeArray(data);
|
data = jQuery.makeArray(data);
|
||||||
data.unshift( event );
|
data.unshift( event );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
event.currentTarget = elem;
|
event.currentTarget = elem;
|
||||||
|
|
Loading…
Reference in a new issue