Author: sevein
Date: Thu Feb 16 14:39:19 2012
New Revision: 10922

Log:
Add console.log wrapper to qubit.js

Modified:
   trunk/js/qubit.js

Modified: trunk/js/qubit.js
==============================================================================
--- trunk/js/qubit.js   Thu Feb 16 14:22:05 2012        (r10921)
+++ trunk/js/qubit.js   Thu Feb 16 14:39:19 2012        (r10922)
@@ -2,6 +2,19 @@
 
 var Qubit = Qubit || {};
 
+// Usage: log('inside coolFunc',this,arguments);
+// http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
+window.log = function()
+  {
+    log.history = log.history || [];
+    log.history.push(arguments);
+
+    if (this.console)
+    {
+      console.log( Array.prototype.slice.call(arguments) );
+    }
+  };
+
 // jQuery expander
 Drupal.behaviors.expander = {
   attach: function (context)

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to