If we want a callback while the user clicks a button, we just simply type
btn.addEventListener('click', callback)
The question I want to figure out is this: how can it work? How to do that?
Did the browser add a thread that continued checking for it (that's obviously not the case, since it consumes lots of resources).
Or did the browser inside use some kind of server push-technology or something else?