Do anchor tags in HTML have an automatic click listener applied?
Came across a situation between a <div onclick="javascript:window.location.href='/new-place'">
vs wrapping that element inside a <a href="/new-place">
and wondered if the load on the thread is different from the perspective of does the <a>
link have kind of an automatic click listener on it which would effectively make it the same as the <div onclick="">
listener?
As far as I can tell they are basically the same, in terms of listeners but wanted to see if my findings are correct?