When I reported it, it was refused but the answer was simple – create the shortcut like this:
var log = console.log.bind(console);
This doesn’t leave out the line number, whilst you can call it like log(...)
.
More Related Contents:
- Colors in JavaScript console
- Console.log showing only the updated version of the object printed
- What’s the difference between console.dir and console.log?
- clear javascript console in Google Chrome
- TypeError: Illegal Invocation on console.log.apply
- How to make Google Chrome JavaScript console persistent?
- How to include JavaScript file or library in Chrome console?
- How do I print debug messages in the Google Chrome JavaScript Console?
- Chrome JavaScript developer console: Is it possible to call console.log() without a newline?
- How to get result of console.trace() as string in javascript with chrome or firefox?
- Official locator strategies for the webdriver
- Use a content script to access the page context variables and functions
- Weird behavior with objects & console.log [duplicate]
- Suppress Chrome ‘Failed to load resource’ messages in console
- Jquery load() only working in firefox?
- Chrome Uncaught Syntax Error: Unexpected Token ILLEGAL [duplicate]
- Get element CSS property (width/height) value as it was set (in percent/em/px/etc)
- Violation Long running JavaScript task took xx ms
- Unexpected token ILLEGAL in webkit
- How to keep Google Chrome Extension popup open?
- What happens to code after a javascript redirect (setting window.location.href)?
- ‘load’ event not firing when iframe is loaded in Chrome
- How to give a Blob uploaded as FormData a file name?
- Is there a way to change context to iframe in javascript console?
- How do I get console input in spidermonkey JavaScript?
- MediaRecorder.stop() doesn’t clear the recording icon in the tab
- Detect left mouse button press
- Choppy/Laggy scroll event on Chrome and IE
- How to open mailto links in new tab for users that have gmail as the default mail handler?
- How to to initialize keyboard event with given char/keycode in a Chrome extension?