Will the following log itself upon getting clicked in every browser?
<a target='_blank' href="#" onclick="console.log(this);">Click me!</a>
Yes, for inline html attribute event handlers
this is reliably the element in question.
However your example with
console.log(this) will not work in every browser, because not all browsers have a console, and certain browsers with a console give an error unless the console is actually open when the
console.log() statement executes.