hoodiehq-archive / hood.ie-website-old

⛔ deprecated
http://hood.ie
74 stars 14 forks source link

wrong code example #52

Closed gr2m closed 10 years ago

gr2m commented 10 years ago
hoodie.store.on('add:task', function (event, changedObject) {
  // Update the view with the changedObject
});

should be

hoodie.store.on('add:task', function (newObject) {
  // Update the view with the changedObject
});

Only the change event passes the eventName as first parameter. I'd also suggest to change the event parameter in the other examples to eventName, to not confuse it with the typical event parameter from jQuery, which is actually an event object.