api.jquery.com icon indicating copy to clipboard operation
api.jquery.com copied to clipboard

Make entry for jQuery.Event

Open kswedberg opened this issue 12 years ago • 1 comments

Pull content from Event Object category in categories.xml

kswedberg avatar Oct 15 '12 20:10 kswedberg

Additionally, the example only talks about these two syntax:

jQuery.Event( "click" )

and

jQuery.Event( "keydown", { keyCode: 64 } );

But the source says it may be used to "clone" an event: https://github.com/jquery/jquery/blob/master/src/event.js#L523

jQuery.Event = function( src, props ) {
...
// Event object
if ( src && src.type ) {
	....
// Event type
} else {
	...
}

Example:

var new_event = jQuery.Event( old_event )

If it's not reserved for internal use, it should be documented too.

tdelmas avatar Feb 27 '18 16:02 tdelmas