Difference between revisions of "UnmonitorEvents"

From FirebugWiki
Jump to: navigation, search
(Extended description)
m (Added categories)
 
Line 43: Line 43:
 
* [[monitorEvents]]
 
* [[monitorEvents]]
 
* [[Command Line API]]
 
* [[Command Line API]]
 +
 +
[[Category:Firebug]]
 +
[[Category:UI]]
 +
[[Category:API]]

Latest revision as of 17:06, 21 November 2013

Turns off logging for all or specific events dispatched to an object.

Syntax[edit]

unmonitorEvents(object[, types])

Parameters[edit]

object[edit]

Object to remove logging of events for. (required)

types[edit]

Event type(s) to remove from logging. This can be a single event type or an array of event types. (optional)

Besides supporting all normal events Firebug and Web Inspector offer a bunch of event groups, which combine several event types. For a list of available event groups see monitorEvents.

Examples[edit]

unmonitorEvents(document.body)

This will unmonitor all events occurring to the <body> element.

unmonitorEvents(document.getElementsByTagName("input")[0], "keydown")

This will unmonitor all keydown events occurring to the first <input> element.

unmonitorEvents(document.getElementById("interactive"), "mouse")

This will unmonitor all mouse events (click, dblclick, mousedown, mousemove, mouseup, mouseout and mouseover) occurring to the element with the id interactive.

unmonitorEvents(document.getElementById("interactive"), ["mouse", "keyup", "keydown"])

This will unmonitor all mouse events (click, dblclick, mousedown, mousemove, mouseup, mouseout and mouseover) plus all keyup and keydown events occurring to the element with the id interactive.

See also[edit]