Skip to content

Instantly share code, notes, and snippets.

@gabrieljoelc
Created May 21, 2013 17:40
Show Gist options
  • Save gabrieljoelc/5621687 to your computer and use it in GitHub Desktop.
Save gabrieljoelc/5621687 to your computer and use it in GitHub Desktop.
Example of calling a "base" method in JavaScript using Backbone.js.
Backbone.Collection.extend({
add: function(models, options) {
models.doSomethingSpecific();
return Backbone.Collection.prototype.add.call(this, models, options);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment