[Pkg-javascript-commits] [backbone] 26/101: docs

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:58:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.1.0
in repository backbone.

commit ddd87c0e436fc6a1159df0d332b93229ce2cc946
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Mon Oct 4 15:43:47 2010 -0400

    docs
---
 backbone.js | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/backbone.js b/backbone.js
index 44fd0ca..f1ea2ca 100644
--- a/backbone.js
+++ b/backbone.js
@@ -1,8 +1,7 @@
-// Backbone.js
-// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
-// Backbone may be freely distributed under the terms of the MIT license.
-// For all details and documentation:
-// http://documentcloud.github.com/backbone
+//    (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
+//    Backbone may be freely distributed under the terms of the MIT license.
+//    For all details and documentation:
+//    http://documentcloud.github.com/backbone
 
 (function(){
 
@@ -38,7 +37,13 @@
   // -----------------
 
   // A module that can be mixed in to any object in order to provide it with
-  // custom events.
+  // custom events. You may `bind` or `unbind` a callback function to an event;
+  // `trigger`-ing an event fires all callbacks in succession.
+  //
+  //    _.extend(object, Backbone.Bindable);
+  //    object.bind('expand', function(){ alert('expanded'); });
+  //    object.trigger('expand');
+  //
   Backbone.Bindable = {
 
     // Bind an event, specified by a string name, `ev`, to a `callback` function.
@@ -73,7 +78,7 @@
       return this;
     },
 
-    // Trigger an event, firing all bound callbacks
+    // Trigger an event, firing all bound callbacks.
     trigger : function(ev) {
       var calls = this._callbacks;
       for (var i = 0; i < 2; i++) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list