( context, args )
| 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…