MCPcopy Create free account
hub / github.com/unconed/TermKit / trigger

Function trigger

HTML/jquery.js:3346–3359  ·  view source on GitHub ↗
( type, elem, args )

Source from the content-addressed store, hash-verified

3344}
3345
3346function trigger( type, elem, args ) {
3347 // Piggyback on a donor event to simulate a different one.
3348 // Fake originalEvent to avoid donor's stopPropagation, but if the
3349 // simulated event prevents default then we do the same on the donor.
3350 // Don't pass args or remember liveFired; they apply to the donor event.
3351 var event = jQuery.extend( {}, args[ 0 ] );
3352 event.type = type;
3353 event.originalEvent = {};
3354 event.liveFired = undefined;
3355 jQuery.event.handle.call( elem, event );
3356 if ( event.isDefaultPrevented() ) {
3357 args[ 0 ].preventDefault();
3358 }
3359}
3360
3361// Create "bubbling" focus and blur events
3362if ( !jQuery.support.focusinBubbles ) {

Callers 1

jquery.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected