MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / fire

Function fire

src/test/resources/libraries/jQuery/1.8.2/jquery/src/callbacks.js:60–85  ·  view source on GitHub ↗
( data )

Source from the content-addressed store, hash-verified

58 stack = !options.once && [],
59 // Fire callbacks
60 fire = function( data ) {
61 memory = options.memory && data;
62 fired = true;
63 firingIndex = firingStart || 0;
64 firingStart = 0;
65 firingLength = list.length;
66 firing = true;
67 for ( ; list && firingIndex < firingLength; firingIndex++ ) {
68 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
69 memory = false; // To prevent further calls using add
70 break;
71 }
72 }
73 firing = false;
74 if ( list ) {
75 if ( stack ) {
76 if ( stack.length ) {
77 fire( stack.shift() );
78 }
79 } else if ( memory ) {
80 list = [];
81 } else {
82 self.disable();
83 }
84 }
85 },
86 // Actual Callbacks object
87 self = {
88 // Add a callback or a collection of callbacks to the list

Callers 1

callbacks.jsFile · 0.70

Calls 3

shiftMethod · 0.80
applyMethod · 0.45
disableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…