[Pkg-javascript-commits] [backbone] 16/19: less cryptic method of safely referencing jQuery.

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


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

js pushed a commit to tag 0.1.1
in repository backbone.

commit aa35cb64143eae32e584db19398c67145f4f50a1
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Wed Oct 13 22:15:12 2010 -0400

    less cryptic method of safely referencing jQuery.
---
 backbone.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/backbone.js b/backbone.js
index 964713d..88d8f16 100644
--- a/backbone.js
+++ b/backbone.js
@@ -3,7 +3,7 @@
 //     For all details and documentation:
 //     http://documentcloud.github.com/backbone
 
-(function($, undefined){
+(function(){
 
   // Initial Setup
   // -------------
@@ -21,6 +21,9 @@
   var _ = this._;
   if (!_ && (typeof require !== 'undefined')) _ = require("underscore")._;
 
+  // For Backbone's purposes, jQuery owns the `$` variable.
+  var $ = this.$;
+
   // Helper function to correctly set up the prototype chain, for subclasses.
   // Similar to `goog.inherits`, but uses a hash of prototype properties and
   // class properties to be extended.
@@ -617,4 +620,4 @@
     });
   };
 
-})(jQuery);
+})();

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