Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Events

Events are a basic inversion of control. Instead of having one function call another by name, the second function is registered as a handler to be called when a specific event occurs.

The part of your application that has to know how to call the other part of your app has been inverted. This is the core component that makes it possible for your business logic to not have to know about how your user interface works, and the most powerful thing about the Backbone events system.

Mastering events is one of the quickest ways to become more productive with Backbone, so let’s take a closer look at Backbone’s event model.

Backbone.Events is mixed into the other Backbone classes, including:

  • Backbone

  • Backbone.Model


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial