Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from trevnorris/logfunc

dynamically set log function based on browser compatibility
  • Loading branch information...
commit d9ded3e7f7481ba0d447edc6c11026f76bb7397a 2 parents 5796bb0 + 4a7acce
@addyosmani authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 myQuery.js
View
10 myQuery.js
@@ -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 ?
Please sign in to comment.
Something went wrong with that request. Please try again.