Warning: Generally you should avoid using
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.
unwatch() method removes a watchpoint set with the
- The name of a property of the object to stop watching.
By default, this method is inherited by every object descended from
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
|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|
Documentobject throws a
TypeErrorsince Firefox 23 (bug 903332). This regression has been fixed with Firefox 27.
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.