javascript - How can I change the default behavior of console.log in Safari? -


in safari no add-ons, console.log show object @ last state of execution, not @ state when console.log called.

i have clone object output via console.log state of object @ line.

example:

var test = {a: true} console.log(test); // {a: false} test.a = false;  console.log(test); // {a: false} 

i think you're looking console.dir().

console.log() doesn't want because prints reference object, , time pop open, it's changed. console.dir prints directory of properties in object @ time call it.

the json idea below one; go on parse json string , browsable object .dir() give you:

console.log(json.parse(json.stringify(obj)));


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -