MCPcopy Create free account
hub / github.com/frank-lam/fullstack-tutorial / fire

Function fire

notes/docsify/unpkg/gotop/jquery-2.1.0.js:3040–3065  ·  view source on GitHub ↗
( data )

Source from the content-addressed store, hash-verified

3038 stack = !options.once && [],
3039 // Fire callbacks
3040 fire = function( data ) {
3041 memory = options.memory && data;
3042 fired = true;
3043 firingIndex = firingStart || 0;
3044 firingStart = 0;
3045 firingLength = list.length;
3046 firing = true;
3047 for ( ; list && firingIndex < firingLength; firingIndex++ ) {
3048 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
3049 memory = false; // To prevent further calls using add
3050 break;
3051 }
3052 }
3053 firing = false;
3054 if ( list ) {
3055 if ( stack ) {
3056 if ( stack.length ) {
3057 fire( stack.shift() );
3058 }
3059 } else if ( memory ) {
3060 list = [];
3061 } else {
3062 self.disable();
3063 }
3064 }
3065 },
3066 // Actual Callbacks object
3067 self = {
3068 // Add a callback or a collection of callbacks to the list

Callers 1

jquery-2.1.0.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected