Home » Backbone.js ListenToOnce()

Backbone.js ListenToOnce()

by Online Tutorials Library

Backbone.js Event listenToOnce()

Backbone.js Event listenToOnce method is same as listenTo event but the only difference that causes the listen to occur only once before the callback function is being removed.

Syntax:

Parameter explanation:

other: It is used to define the name of the other object.

event: It is used to bind an object.

callback:It is reference to the code and called with object as context.

Let’s take an example.

See this example:

You may also like