MCPcopy Create free account
hub / github.com/nwutils/nw-sample-apps / fire

Function fire

camera/jquery.js:3065–3090  ·  view source on GitHub ↗
( data )

Source from the content-addressed store, hash-verified

3063 stack = !options.once && [],
3064 // Fire callbacks
3065 fire = function( data ) {
3066 memory = options.memory && data;
3067 fired = true;
3068 firingIndex = firingStart || 0;
3069 firingStart = 0;
3070 firingLength = list.length;
3071 firing = true;
3072 for ( ; list && firingIndex < firingLength; firingIndex++ ) {
3073 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
3074 memory = false; // To prevent further calls using add
3075 break;
3076 }
3077 }
3078 firing = false;
3079 if ( list ) {
3080 if ( stack ) {
3081 if ( stack.length ) {
3082 fire( stack.shift() );
3083 }
3084 } else if ( memory ) {
3085 list = [];
3086 } else {
3087 self.disable();
3088 }
3089 }
3090 },
3091 // Actual Callbacks object
3092 self = {
3093 // Add a callback or a collection of callbacks to the list

Callers 1

jquery.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected