Permalink
Browse files

Merge pull request #2 from trevnorris/logfunc

dynamically set log function based on browser compatibility
  • Loading branch information...
2 parents 5796bb0 + 4a7acce commit d9ded3e7f7481ba0d447edc6c11026f76bb7397a @addyosmani committed Nov 22, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 myQuery.js
View
@@ -228,11 +228,13 @@
// Easy log fn
- this.log = function() {
- if (window.console && typeof console.log === 'function') {
+ this.log = (window.console && typeof console.log === 'function') ?
+ function() {
console.log(this.selection);
- }
- };
+ } :
+ function() {
+ //TODO: create alternative logging
+ };
return this instanceof myQuery ?

0 comments on commit d9ded3e

Please sign in to comment.