Bound console methods

2019-05-03 08:07发布

问题:

To my knowledge, console methods are bound in most if not all modern JS engines.

var log = console.log;
log('foo');

window.addEventListener('load', console.log); // or any other API that accepts callbacks

will result in proper console output, at least in up-to-date Edge, Firefox and Chrome/Node.js versions, so it's relatively safe to rely on this behaviour in development environment.

Unfortunately, Can I use and MDN don't cover this and potentially contain unverified information.

What are exact browser versions where this behaviour is supported?

Is this a part of any current standard or a proposal?