1.4 - Events in Detail Flashcards
Mouse events can be splitted into 2 categories, simple and complex, it is right?
YES
Mouse events can be split into how many categories? and who are them
2 categories
simple and complex
Describe some of the most used simple mouse envents
mousedown / mouseup
mouseover / mouseout
mousemove
Some of the most used mouse simple events are:
mousedown / mouseup
mouseover / mouseout
mousemove
YES
mousedown / mouseup
Describe it
In what category is it?
description: mouse button is clicked / released over an element
category: simple
mouseover / mouseout
Describe it
In what category is it?
description: mouse pointer comes over / out from an element
category: simple
mousemove
Describe it
In what category is it?
describe: every mouse move over an elemen triggers that event
category: simple
some of the most used complex mouse events are
click
contextmenu
dblclick
?
yes
some of the most used complex events are?
click
contextmenu
dblclick
complex events are made of simple ones?
yes
Complex events are made of …?
simple ones
click event
Describe it
In what category is it?
description: triggers after mousedown and then mouseup is released over the same element
category: complex
contextmenu event
Describe it
In what category is it?
description: triggers after mousedown if the right mouse button was used
category: complex
dblclick
Describe it
In what category is it?
description: triggers after a double click over an element.
category: complex
Can an action trigger multiple events?
explain it with an example
YES
a click first triggers mousedown, when the button is pressed, then mouseup and click when it’s released
How is the events order in the case when a single action initiates multiple events?
describe the click event
Their order is fixed.
The handlers are called in the order
mousedown -> mouseup -> click
A click first triggers mousedown, when the buttos is pressed, then mouseup and click when it’s released
The which property is:
allows to get the mouse button ?
YES
What is the usage or purpose of the which property on click-related events?
Click related events always have the which property that allows to get the button

The which property it’s used for click and contextmenu events?
No, because those happens only on left click and on right click only
When it is usefull the which property on click related events?
When we are tracking mousedown and mouseup, because these events trigger on any button, so which allows to distinguish between “right-mousedown” and “left-mousedown”

Name the possible values of the which property

All mouse events include the information about pressed modifier keys?
YES
Can we know about any modifier key being pressed, when using mouse events?
and why?
YES
because all mouse events include the information about pressed modifier keys
What are the modifiers keys?
shiftKey
altKey
ctrlKey
metaKey (cmd for mac)




















































