UnmonitorEvents
From FirebugWiki
Sebastianz (Talk | contribs) (Separate Command Line API page for unmonitorEvents()) |
Sebastianz (Talk | contribs) (Extended description) |
||
| (One intermediate revision not shown) | |||
| Line 1: | Line 1: | ||
| - | Turns off logging for all events dispatched to an object | + | Turns off logging for all or specific events dispatched to an object. |
| - | For a list of available event | + | == Syntax == |
| + | <source lang="javascript"> | ||
| + | unmonitorEvents(object[, types]) | ||
| + | </source> | ||
| + | |||
| + | == Parameters == | ||
| + | === object === | ||
| + | Object to remove logging of events for. '''(required)''' | ||
| + | |||
| + | === types === | ||
| + | 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 == | ||
| + | <source lang="javascript"> | ||
| + | unmonitorEvents(document.body) | ||
| + | </source> | ||
| + | |||
| + | This will unmonitor all events occurring to the <code><body></code> element. | ||
| + | |||
| + | <source lang="javascript"> | ||
| + | unmonitorEvents(document.getElementsByTagName("input")[0], "keydown") | ||
| + | </source> | ||
| + | |||
| + | This will unmonitor all <code>keydown</code> events occurring to the first <code><input></code> element. | ||
| + | |||
| + | <source lang="javascript"> | ||
| + | unmonitorEvents(document.getElementById("interactive"), "mouse") | ||
| + | </source> | ||
| + | |||
| + | This will unmonitor all mouse events (<code>click</code>, <code>dblclick</code>, <code>mousedown</code>, <code>mousemove</code>, <code>mouseup</code>, <code>mouseout</code> and <code>mouseover</code>) occurring to the element with the id <code>interactive</code>. | ||
| + | |||
| + | <source lang="javascript"> | ||
| + | unmonitorEvents(document.getElementById("interactive"), ["mouse", "keyup", "keydown"]) | ||
| + | </source> | ||
| + | |||
| + | This will unmonitor all mouse events (<code>click</code>, <code>dblclick</code>, <code>mousedown</code>, <code>mousemove</code>, <code>mouseup</code>, <code>mouseout</code> and <code>mouseover</code>) plus all <code>keyup</code> and <code>keydown</code> events occurring to the element with the id <code>interactive</code>. | ||
| + | |||
| + | == See also == | ||
| + | * [[monitorEvents]] | ||
| + | * [[Command Line API]] | ||
Latest revision as of 13:11, 5 July 2012
Turns off logging for all or specific events dispatched to an object.
Contents |
[edit] Syntax
unmonitorEvents(object[, types])
[edit] Parameters
[edit] object
Object to remove logging of events for. (required)
[edit] types
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.
[edit] Examples
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.