An event is something that is called when something happens, for example, click or keypress events.
The Window read-only property event returns the event that is currently managed by the code of the site. The value is often undefined outside of an event handler's context.
You should stop using this property in a new code and use the passed event in the event handler function instead. This property is not universally supported and creates potential fragility to the code even when supported.
This property may be fragile and there may be situations where the returned occurrence is not the expected value. Also, for events dispatched within shadow trees, Window.event is not accurate.