DOM Object Events Flashcards
AnimationEvent
an event for CSS animations
types: animationstart, animationend,
animationiteration (when an animation is repeated)
properties: animationName, elapsedTime,
psuedo-element
ClipboardEvent
Events that occur when the clipboard is modified
types: oncopy, oncut, onpaste
property: clipboardData
DragEvent
Events that occur when elements are dragged and/or dropped. Inherits properties from MouseEvent.
types: ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop
property: dataTransfer
FocusEvent
Events that occur when elements gets or loses focus. Inherits properties and methods from UiEvent.
types: onblur, onfocus
onfocusin (about to get focus)
onfocusout (about to lose focus)
InputEvent
Events that occur when a form element’s content changes. Inherits from UiEvent
type: oninput
properties: data, dataTransfer, getTargetRanges(), inputType, isComposing
TouchEvent, KeyboardEvent, MouseEvent properties:
altKey, ctrlKey, shiftKey, metaKey
Boolean properties that return true if each key was pressed when the event triggered
meta is command/windows key
KeyboardEvent
Events that occur when user presses a key on the keyboard. Inherits from UiEvent
types: onkeydown, onkeypress, onkeyup
properties: code, charCode, key, location, repeat, which
MouseEvent
Events that occur when the mouse interacts with the HTML document. Inherits from UiEvent
types: onclick, ondblclick, oncontextmenu (M2), onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmousup
properties: clientX, clientY, screenX, screenY, movementX, movementY, offsetX, offsetY, pageX, pageY
client: browser
page: document
offset: target element
screen: user’s screen
movement: relative to prior mouse event
PageTransitionEvent
Events that occur when user navigates to, and away from, a webpage.
types: pagehide, pageshow
property: persisted (was the page cached by the browser)
ProgressEvent
Events that occur when loading external resources, belongs to the ProgressEvent Object.
types: onerror, onloadstart
TouchEvent
Events that occur when user touches a touch-based device
types: ontouchcancel, ontouchend, ontouchmove, ontouchstart
properties: touches, targettouches, changedtouches
TransitionEvent
Events that occur when a CSS transition runs
type: transitionend
properties: propertyName, elapsedTime, pseudoElement
UiEvent
Events that are triggered from the user interface.
Childrend of UiEvent: FocusEvent, InputEvent, KeyboardEvent, MouseEvent, TouchEvent, WheelEvent
types: abort, beforeunload, error, load, resize, scroll, select, unload
WheelEvent
Events that occur when the mouse wheel is scrolling. Inherits from MouseEvent and UiEvent
type: onwheel
properties: deltaX, deltaY, deltaZ, deltaMode
abort
when the loading of media is aborted