Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

I volontari di MDN non hanno ancora tradotto questo articolo in Italiano. Registrati per tradurlo tu.

Warning: Generally you should avoid using unwatch() and watch() when possible. These two methods are implemented only in Gecko, and they're intended primarily for debugging use. In addition, using watchpoints has a serious negative impact on performance, which is especially true when used on global objects, such as window. You can usually use setters and getters or proxies instead. See Browser compatibility for details.

The unwatch() method removes a watchpoint set with the watch() method.

Syntax

obj.unwatch(prop)

Parameters

prop
The name of a property of the object to stop watching.

Return value

undefined.

Description

The JavaScript debugger has functionality similar to that provided by this method, as well as other debugging options. For information on the debugger, see Venkman.

By default, this method is inherited by every object descended from Object.

Note: The reason for unwatch() to take the property name prop as its only parameter is due to the "single handler allowing" behavior of the watch() method.

Examples

See watch().

Specifications

Not part of any specifications. Implemented in JavaScript 1.2.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support (Yes) No support No support No support
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support No support (Yes) No support No support No support

Compatibility notes

  • Calling unwatch() on the Document object throws a TypeError since Firefox 23 (bug 903332). This regression has been fixed with Firefox 27.

See also

Tag del documento e collaboratori

 Hanno collaborato alla realizzazione di questa pagina: fscholz, eduardoboucas, Mingun, kohei.yoshino, kscarfone, Sheppy, ethertank, trevorh, BYK, evilpie, Mgjbot, Sevenspade, Talisker, Yuichirou, Maian, Marcoos, Dria
 Ultima modifica di: fscholz,