MCPcopy Create free account
hub / github.com/JsAaron/jQuery / fire

Function fire

2.1.1/test/jquery-1.11.1.js:3113–3138  ·  view source on GitHub ↗
( data )

Source from the content-addressed store, hash-verified

3111 stack = !options.once && [],
3112 // Fire callbacks
3113 fire = function( data ) {
3114 memory = options.memory && data;
3115 fired = true;
3116 firingIndex = firingStart || 0;
3117 firingStart = 0;
3118 firingLength = list.length;
3119 firing = true;
3120 for ( ; list && firingIndex < firingLength; firingIndex++ ) {
3121 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
3122 memory = false; // To prevent further calls using add
3123 break;
3124 }
3125 }
3126 firing = false;
3127 if ( list ) {
3128 if ( stack ) {
3129 if ( stack.length ) {
3130 fire( stack.shift() );
3131 }
3132 } else if ( memory ) {
3133 list = [];
3134 } else {
3135 self.disable();
3136 }
3137 }
3138 },
3139 // Actual Callbacks object
3140 self = {
3141 // Add a callback or a collection of callbacks to the list

Callers 1

jquery-1.11.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected