Top "Callback" questions

A callback is a piece of code (i.e. the address or reference of a function or method or a lambda expression) that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time.

Getting a better understanding of callback functions in JavaScript

I understand passing in a function to another function as a callback and having it execute, but I'm not understanding …

javascript function callback
jQuery pass more parameters into callback

Is there a way to pass more data into a callback function in jQuery? I have two functions and I …

javascript jquery function callback arguments
Defining TypeScript callback type

I've got the following class in TypeScript: class CallbackTest { public myCallback; public doWork(): void { //doing some work... this.myCallback(); //calling …

types callback typescript
Wait till a Function with animations is finished until running another Function

I'm having an issue with normal (non-ajax) functions that involve lots of animations within each of them. Currently I simply …

javascript jquery callback
Pass correct "this" context to setTimeout callback?

How do I pass context into setTimeout? I want to call this.tip.destroy() if this.options.destroyOnHide after 1000 ms. …

javascript callback this settimeout
What is the purpose of willSet and didSet in Swift?

Swift has a property declaration syntax very similar to C#'s: var foo: Int { get { return getFoo() } set { setFoo(newValue) } } …

swift callback didset property-observer
Python time measure function

I want to create a python function to test the time spent in each function and print its name with …

python time callback
How do I perform a JAVA callback between classes?

I am coming from JavaScript, in which callbacks are pretty easy. I am trying to implement them into JAVA, without …

java callback
How to create a JavaScript callback for knowing when an image is loaded?

I want to know when an image has finished loading. Is there a way to do it with a callback? …

javascript image callback loading
How to explain callbacks in plain english? How are they different from calling one function from another function?

How to explain callbacks in plain English? How are they different from calling one function from another function taking some …

function callback language-agnostic terminology