MCPcopy
hub / github.com/requirejs/requirejs / fire

Function fire

tests/jquery/scripts/jquery-1.7.1.js:1038–1064  ·  view source on GitHub ↗
( context, args )

Source from the content-addressed store, hash-verified

1036 },
1037 // Fire callbacks
1038 fire = function( context, args ) {
1039 args = args || [];
1040 memory = !flags.memory || [ context, args ];
1041 firing = true;
1042 firingIndex = firingStart || 0;
1043 firingStart = 0;
1044 firingLength = list.length;
1045 for ( ; list && firingIndex < firingLength; firingIndex++ ) {
1046 if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
1047 memory = true; // Mark as halted
1048 break;
1049 }
1050 }
1051 firing = false;
1052 if ( list ) {
1053 if ( !flags.once ) {
1054 if ( stack && stack.length ) {
1055 memory = stack.shift();
1056 self.fireWith( memory[ 0 ], memory[ 1 ] );
1057 }
1058 } else if ( memory === true ) {
1059 self.disable();
1060 } else {
1061 list = [];
1062 }
1063 }
1064 },
1065 // Actual Callbacks object
1066 self = {
1067 // Add a callback or a collection of callbacks to the list

Callers 1

jquery-1.7.1.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…