Javatpoint Logo
Javatpoint Logo

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:

Test it Now

Output:

Save the above code in listentoonce.html file and open this file in a browser.

BackboneJS Event listentoonce Method
Next TopicBackbone.js Model





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA