Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (7k points)
What do window.event() does in JavaScript?

1 Answer

0 votes
by (13.1k points)

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.

Want to be a full stack developer? Check out the full stack developer course from Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Feb 16, 2021 in Java by dante07 (13.1k points)
0 votes
1 answer
asked Mar 31, 2021 in Java by dante07 (13.1k points)

Browse Categories

...