unwatch() (Function/global)

Un-set a watch-point for a named property of an object.

Availability:

JavaScript - 1.2
Netscape version - 4.0
JavaScript syntax:NmyObject.unwatch(aProperty)
Argument list:aPropertyA property to cease watching

This method is provided to ease the task of debugging JavaScript.

It is provided to disconnect the watcher that was set up with the watch() method.

Its calling circumstances are identical and you simply need to provide a complementary unwatch() to deactivate the effects of a watch().

The new event model supported by Netscape version 6.0 and that already available in MSIE 5.0 present a propertyName property that belongs to the Event object. You can inspect that during an onPropertyChanged event and achieve the same watch()/unwatch() behavior.

See also:Event, Event handler, Event management, Event model, Event object, onPropertyChange, watch()

Cross-references:

Wrox Instant JavaScript - page - 56