Live data from Hacker News

Google Chrome to remove detailed cookie and site data controls

lapcatsoftware.com

371–372 of 372 posts

Re: Google Chrome to remove detailed cookie and site data controls

#371

Earlier quoted context omitted.

I'm saying you can't avoid calling toString. Their code will call console.log(object) every X ticks. As soon as you open the console, console.log fires instead of early exiting => object.toString is called => they know the console is open

Well… you can on a lot of things. We never did .toString() on a whole lot. However, I was big on .displayName (as an override on .name which is found on functions) My memory is fuzzy, but I also had a different function I would call if frameworks added it so instead of “Object {}” it was “Backbone.Model {id=1}”. I put these in and used them in firebug extensions I wrote for frameworks. Later I asked chrome to add som…

Do you not understand that it's not your code and that their code wants toString to be called?

Someone else is writing code that they want to have react to the console opening.

So they will intentionally force the call as soon as the console is open, as a result toString is called regardless of if you yourself have made a call to it.

Re: Google Chrome to remove detailed cookie and site data controls

#372
post #370

Earlier quoted context omitted.

I'm saying you can't avoid calling toString. Their code will call console.log(object) every X ticks. As soon as you open the console, console.log fires instead of early exiting => object.toString is called => they know the console is open

> console.log fires instead of early exiting => object.toString The point is that you patch the console to not do that.

How does "JSON.stringify(object)" patch the console not to do that without first opening the console?
Post reply on HN