jQuery-Chrono icon indicating copy to clipboard operation
jQuery-Chrono copied to clipboard

Additional args missed

Open martinborthiry opened this issue 14 years ago • 1 comments

Nice tool, but:

Don't forget that the function in setTimeout and setInterval can recive aditional arguments.

Example: var additionalVar1 = 11, additionalVar2 = 22; setTimeout( function( a, b){ .... }, 1000, additionalVar1, additionalVar2);

// inside function "a" and "b" will be 11 and 22.

Is not common, but in some cases it is very usefull. best regards

martinborthiry avatar May 21 '11 12:05 martinborthiry

Neat find, have never seen that syntax.

I didn't see the extra arguments described on W3schools but only at MDC. The latter says "Note that passing additional parameters to the function in the first syntax does not work in Internet Explorer."

Since it's not cross-browser, I'll keep this issue open but hold off on a fix unless more folks need it.

avk avatar May 26 '11 00:05 avk