MCPcopy
hub / github.com/requirejs/requirejs / add

Function add

tests/jquery/scripts/jquery-1.7.1.js:1017–1036  ·  view source on GitHub ↗
( args )

Source from the content-addressed store, hash-verified

1015 firingIndex,
1016 // Add one or several callbacks to the list
1017 add = function( args ) {
1018 var i,
1019 length,
1020 elem,
1021 type,
1022 actual;
1023 for ( i = 0, length = args.length; i < length; i++ ) {
1024 elem = args[ i ];
1025 type = jQuery.type( elem );
1026 if ( type === "array" ) {
1027 // Inspect recursively
1028 add( elem );
1029 } else if ( type === "function" ) {
1030 // Add if not in unique mode and callback is not in
1031 if ( !flags.unique || !self.has( elem ) ) {
1032 list.push( elem );
1033 }
1034 }
1035 }
1036 },
1037 // Fire callbacks
1038 fire = function( context, args ) {
1039 args = args || [];

Callers 2

jquery-1.7.1.jsFile · 0.85
buildParamsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected