A
A
AlphaDMQ2018-07-11 12:15:34
JavaScript
AlphaDMQ, 2018-07-11 12:15:34

Does the event object update its properties when the event occurs, or is a new object created?

Imagine that a 'mousemove' handler has been attached to document.
When moving the mouse in the event handler function, is it a new event object each time, or the same object with updated values?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2018-07-11
@sergiks

New. Everytime.

V
Vladimir, 2018-07-11
@Casufi

And it's weak to create a test example yourself? It will be hard for you to study.
https://jsfiddle.net/0dzmn2op/5/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question