add `console.log` function to window, so we can use `log` direct!
zhangenming opened this issue · 5 comments
zhangenming commented
now, we have window.dir,
So why can't we have it.
thanks
domfarolino commented
Interesting, do you know where dir()
is defined in the spec? It seems like a non-standard API that is not available to Safari or Firefox.
terinjokes commented
That's not a property on window, but a custom shortcut implemented inside of Chrome's Developer Tools.
zhangenming commented
Yes, this variable only exists when Chrome's Developer Tools is open.
but console.log
is such a common method, may you can provide a simpler one with fewer keystrokes for easy input?like log
.
tks
domfarolino commented
I feel pretty certain that this could be solved by some basic JS that aliases log
to console.log
etc. I don't think this really needs a lot of platform buy-in. I'm going to close this, but thanks for filing.