Permalink
Browse files

update the log module from the top20 branch

  • Loading branch information...
1 parent 9e20697 commit 565c12a633944d467c2bd12df0d6c20dfb527449 @peter-leonov committed Dec 13, 2011
Showing with 3 additions and 7 deletions.
  1. +3 −7 src/modules/log.js
View
@@ -4,18 +4,14 @@ var s = self
if (!s.log)
{
- // Firebug
- if (s.console && s.console.firebug)
- s.log = console.log
+ // console object present
+ if (s.console)
+ s.log = function () { s.console.log.apply(s.console, arguments) }
// Opera
else if (s.opera && s.opera.postError)
s.log = function () { return s.opera.postError(arguments) }
- // other consoles
- else if (s.console && s.console.log)
- s.log = function () { return s.console.log(Array.prototype.slice.call(arguments).join(', ')) }
-
// none
else
s.log = function () {}

0 comments on commit 565c12a

Please sign in to comment.