patik / console.log-wrapper Goto Github PK
View Code? Open in Web Editor NEWClear console logging for every browser
Home Page: http://patik.github.io/console.log-wrapper/
License: ISC License
Clear console logging for every browser
Home Page: http://patik.github.io/console.log-wrapper/
License: ISC License
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
I see isReallyIE8Plus
is getting used.
But what does isReallyIE8
do? Is it a left over?
In consolelog.js there is an alert left in the code at line 63.
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
end users reported this, and I was able to reproduce and simulate using browserstack Win7/Ie9
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
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
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.
Hey,
Just to let you know.
http://patik.com/min/g=consolelogcss
http://patik.com/min/g=consolelogjs
Are 404'ing on the demo.
Thanks.
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?
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.
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
[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)
That's it!
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.
Why not make this a bower component?
Loading your demo page in IE9, I get:
SCRIPT5009: 'console' is undefined
consolelog.js, line 2 character 1
-- hugh
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.