Object.prototype.unwatch()

  • Revision slug: JavaScript/Reference/Global_Objects/Object/unwatch
  • Revision title: unwatch
  • Revision id: 315555
  • Created:
  • Creator: trevorh
  • Is current revision? No
  • Comment Update links, remove language

Revision Content

{{ Non-standard_header() }}

Summary

Removes a watchpoint set with the watch() method.

Method of Object
Implemented in JavaScript 1.8.6
ECMAScript Edition none

Syntax

unwatch(prop)

Parameters

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

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().

Revision Source

<p>{{ Non-standard_header() }}</p>
<h3 id="Summary" name="Summary">Summary</h3>
<p>Removes a watchpoint set with the <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Object/watch" title="en/JavaScript/Reference/Global_Objects/Object/watch">watch()</a></code> method.</p>
<table class="standard-table">
  <thead>
    <tr>
      <th class="header" colspan="2">Method of <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Object" title="en/JavaScript/Reference/Global_Objects/Object"><code>Object</code></a></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Implemented in</td>
      <td>JavaScript 1.8.6</td>
    </tr>
    <tr>
      <td>ECMAScript Edition</td>
      <td>none</td>
    </tr>
  </tbody>
</table>
<h3 id="Syntax" name="Syntax">Syntax</h3>
<p><code>unwatch(<em>prop</em>) </code></p>
<h3 id="Parameters" name="Parameters">Parameters</h3>
<dl>
  <dt>
    <code>prop</code></dt>
  <dd>
    The name of a property of the object to stop watching.</dd>
</dl>
<h3 id="Description" name="Description">Description</h3>
<p>The JavaScript debugger has functionality similar to that provided by this method, as well as other debugging options. For information on the debugger, see <a href="/en-US/docs/Venkman" title="en/Venkman">Venkman</a>.</p>
<p>By default, this method is inherited by every object descended from <code>Object</code>.</p>
<div class="note">
  <strong>Note:</strong> The reason for <code>unwatch()</code> to take the property name <em>prop</em> as its only parameter is due to the "single handler allowing" behavior of the <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Object/watch" title="watch"><code>watch()</code></a> method.</div>
<h3 id="Examples" name="Examples">Examples</h3>
<p>See <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Object/watch" title="en/JavaScript/Reference/Global_Objects/Object/watch">watch()</a></code>.</p>
Revert to this revision