[Pkg-javascript-commits] [backbone] 36/37: comments for setDomLibrary

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:02:49 UTC 2014


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

js pushed a commit to tag 0.9.1
in repository backbone.

commit 4337fc3ff3bc0f50cb08e3ade022007b538e717f
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Thu Feb 2 16:34:09 2012 -0500

    comments for setDomLibrary
---
 backbone.js | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/backbone.js b/backbone.js
index 3da23a2..7c56f42 100644
--- a/backbone.js
+++ b/backbone.js
@@ -39,27 +39,17 @@
   if (!_ && (typeof require !== 'undefined')) _ = require('underscore');
 
   // For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable.
-  var $ = root.jQuery || root.Zepto || root.ender || root.$;
+  var $ = root.jQuery || root.Zepto || root.ender;
 
-
-  // Set the javascript library that will be used for the selector work
-  // (a.k.a. the `$` variable).
-  //
-  // By default Backbone will use: jQuery, Zepto, or Ender; but the `setDomLibrary()`
-  // method let's you inject an alternate javascript library (or a mock
-  // library for testing your views outside of a browser). This is also useful
-  // if you are using a packaging library -- to add support for `require()`
-  // calls in the browser (e.g. ender or browserify). The scoping used to
-  // support `require()`, prevents Backbone from automatically loading the
-  // default javascript library.
-  //
-  //     Backbone.setDomLibrary(jQuery)
-  //
+  // Set the JavaScript library that will be used for DOM manipulation and
+  // Ajax calls (a.k.a. the `$` variable). By default Backbone will use: jQuery,
+  // Zepto, or Ender; but the `setDomLibrary()` method lets you inject an
+  // alternate JavaScript library (or a mock library for testing your views
+  // outside of a browser).
   Backbone.setDomLibrary = function(lib) {
     $ = lib;
   };
 
-
   // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
   // to its previous owner. Returns a reference to this Backbone object.
   Backbone.noConflict = function() {

-- 
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