// jQuery.Event object
e[expando] ? e :
// Object literal
- jQuery.extend( new jQuery.Event(type), e ) :
+ jQuery.extend( jQuery.Event(type), e ) :
// Just the event type (string)
- new jQuery.Event(type);
+ jQuery.Event(type);
e.target = e.target || elem;
e.currentTarget = elem;
// store a copy of the original event object
// and "clone" to set read-only properties
var originalEvent = event;
- event = new jQuery.Event( originalEvent );
+ event = jQuery.Event( originalEvent );
for ( var i = this.props.length, prop; i; ){
prop = this.props[ --i ];
};
jQuery.Event = function( src ){
+ // Allow instantiation without the 'new' keyword
+ if( !this.preventDefault )
+ return new jQuery.Event(src);
+
// Event object
if( src && src.type ){
this.originalEvent = src;