I was wondering if someone could elaborate on what the event object actually is. I have looked at many sources that all seem to say it is an object that holds information about the current event.
My question is, what is it really? Is it a single global object that holds every event type? Or is there an event object for each unique event that occurs. I have seen in code you can write things like event.type, event.cancelBubble etc. does this mean I can access the event anytime and modify it from anywhere in the code? I have seen in examples of functions accepting an event as an argument, but why should this be if it is a global variable accessible anywhere?
I know this seems a bit broad but most sources seem to not go too much into how the event object works on a lower level. So if someone could clear this confusion for me that would be appreciated.