Pass related objects when triggering events
Keep in mind while using Underscore.js and Backbone.js to pass in the related object for any event you trigger.
By default the current scope will be the related object within the callback.
When using _.bind() or _.bindAll() this scope may be altered according to the callback in use - see example.
Written by Toni Uebernickel
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Backbone.js
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#