diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-08-15 14:15:49 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-08-15 14:15:49 -0400 |
commit | 6318ae6ab90d4b450dfadf32ab95fe52ed6331cb (patch) | |
tree | 50b247fed8569e909e380b281e9145bd1458a39e /src/event.js | |
parent | 7627b8b6d9ef6e57dbd20a55b946bd1991c1223e (diff) | |
download | jquery-6318ae6ab90d4b450dfadf32ab95fe52ed6331cb.tar.gz jquery-6318ae6ab90d4b450dfadf32ab95fe52ed6331cb.zip |
AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163.
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/event.js b/src/event.js index 9262d1d6d..cd468d2a3 100644 --- a/src/event.js +++ b/src/event.js @@ -1,3 +1,15 @@ +define([ + "./core", + "./var/strundefined", + "./var/rnotwhite", + "./var/hasOwn", + "./var/slice", + "./data/var/data_priv", + "./data/accepts", + "./selector", + "./support" +], function( jQuery, strundefined, rnotwhite, hasOwn, slice, data_priv ) { + var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, @@ -57,7 +69,7 @@ jQuery.event = { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : undefined; }; @@ -66,7 +78,7 @@ jQuery.event = { } // Handle multiple events separated by a space - types = ( types || "" ).match( core_rnotwhite ) || [""]; + types = ( types || "" ).match( rnotwhite ) || [""]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; @@ -148,7 +160,7 @@ jQuery.event = { } // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; + types = ( types || "" ).match( rnotwhite ) || [""]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; @@ -210,8 +222,8 @@ jQuery.event = { var i, cur, tmp, bubbleType, ontype, handle, special, eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; cur = tmp = elem = elem || document; @@ -342,7 +354,7 @@ jQuery.event = { var i, j, ret, matched, handleObj, handlerQueue = [], - args = core_slice.call( arguments ), + args = slice.call( arguments ), handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; @@ -827,3 +839,5 @@ jQuery.fn.extend({ } } }); + +}); |