Skip to content

Commit

Permalink
Merge pull request #2 from trevnorris/logfunc
Browse files Browse the repository at this point in the history
dynamically set log function based on browser compatibility
  • Loading branch information
addyosmani committed Nov 22, 2011
2 parents 5796bb0 + 4a7acce commit d9ded3e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions myQuery.js
Expand Up @@ -228,11 +228,13 @@




// Easy log fn // Easy log fn
this.log = function() { this.log = (window.console && typeof console.log === 'function') ?
if (window.console && typeof console.log === 'function') { function() {
console.log(this.selection); console.log(this.selection);
} } :
}; function() {
//TODO: create alternative logging
};




return this instanceof myQuery ? return this instanceof myQuery ?
Expand Down

0 comments on commit d9ded3e

Please sign in to comment.