Code Monkey home page Code Monkey logo

console.log-wrapper's People

Contributors

michaltrmac avatar patik avatar spenoir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

console.log-wrapper's Issues

IE8 error when dev tools are not open

When I click blue log button on the demo page, yellow js warning shows up in IE8. The error is "console is undefined" in consolelog.js. Though if I refresh the page using F5, everything works as expected.
When I open new tab and go to the demo page log still doesn't work.

Error in IE9

Loading your demo page in IE9, I get:

SCRIPT5009: 'console' is undefined
consolelog.js, line 2 character 1

-- hugh

Unused var

I see isReallyIE8Plus is getting used.
But what does isReallyIE8 do? Is it a left over?

The wrapper will fail on iOS <6 for multiple logged values

Hi there, I figured updating your code is better for the community than forking it, so...

instead of writing:

// Opera 11 & iOS <6
if (window.opera) {

one should use something like this:

var btest=window.navigator.userAgent.match(/OS ([0-9]{1})_([0-9]{1})/),
mobileVersion = btest ? 1*(btest[1]+"."+btest[2]) : 0;
// Opera 11 & iOS <6
if (window.opera || ({"iPad":1,"iPhone":1,"iPod":1}[window.navigator.platform] && mobileVersion < 6)) {

this way iOS that were not updated to iOS yet (e.g. the iPad 1) also present usefull log-data in cases where multiple values were passed to window.log()
iOS 5 and earlier writes "[Object]" to the console if more than one value was passed.

Loading fails in IE8 if using es5-shim

Part of es5-shim defines Function.prototype.bind, but restricts that the bind can only bind a function. The first thing that console-log does is check for IE9 by using Function.prototype.bind then binding the console functions, which IE8 thinks are objects, thus failing.

Is this a bug with console-log wrapper because it doesn't fully check for IE9, or es5-shim for not excepting objects for binding?

Call of Call isn't just call? from same Function prototype

At line 95 in consolelog.js

Isn't calling call reduntant? In my opinion since call output depends solely on its context it becomes redundant in my opinion.

Function.prototype.call.call == Function.prototype.call == funcNOP.call.

therefore.

Function.prototype.call.call(console.log, console, Array.prototype.slice.call([args[i]])) == console.log.call(console, Array.prototype.slice.call([args[i]]) )

In turn we see that log already is called in the console context, making, if no context change is expected,

console.log.call(console, Array.prototype.slice.call([args[i]]) ) == console.log(Array.prototype.slice.call([args[i]]) )

Can you confirm this assertion? This was just what caught my eye, never tested it

Opera Dragonfly behaviour changed

Just for info: Opera's behaviour changed a while ago, and from what I can see it now behaves the same way as, say, Chrome DevTools. You may be able to simply drop the special-casing and extra while loop.

Demo fails on Safari 8.0.3 under OS-X 10.10.2

[Error] TypeError: undefined is not an object (evaluating 'suffix.substr')
    _getLineFromStack (consolelog.js, line 99)
    log (consolelog.js, line 146)
    log (demo.js, line 8)
    execute (demo.js, line 93)

Detect IE11

IE 11 doesn't have MSIE in the UA, It does have "Trident" though:

Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; rv:11.0) like Gecko

Show the original line of code

if I use log(123) from console.log-wrapper, it will shows something like
[123] consolelog-min.js:10.

Could you make it show the original line of code like
123 myfile.js:20

IE9 - firebug lite pops up automatically

Experiencing an issue in IE9, where firebuglite automatically opens everytime.

I've discovered this ever while opening the IE f12 developer tools

Function.prototype.bind: 'this' is not a Function object
Line 7, character 13

image

end users reported this, and I was able to reproduce and simulate using browserstack Win7/Ie9

image

Bower tag

Hi there, great work on this library. However, I am trying to load the library in using bower and I have an issue. In my bower.json file I have the following entry in the dependencies:

"consolelog": "2.0.1"

When I run "bower update" I get the error:

bower consolelog#2.0.1             ENORESTARGET No tag found that was able to satisfy 2.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.