monitoreEvents() Turns on logging for all events dispatched to an object.

monitorEvents(object[, events]) :
object may be any element like window, body, div, any dom element etc.
events may be a single event, an array of events, or one of the generic events “types” that are mapped to a predefined collection of events.

Exmaple: Enter this line of code in console:


monitorEvents(window, "scroll");

monitorEvent

You can also specify one of the available event “types”, strings that map to predefined sets of events. The available event types and their associated event mappings are given below:

mouse: "mousedown", "mouseup", "click", "dblclick", "mousemove", "mouseover", "mouseout", "mousewheel"
key: "keydown", "keyup", "keypress", "textInput"
touch: "touchstart", "touchmove", "touchend", "touchcancel"
control: "resize", "scroll", "zoom", "focus", "blur", "select", "change", "submit, "reset"

Example: Enter this line of code in console:

monitorEvents(document.body, "mouse");

keyMonitorEvent