Regressed watch() throws a TypeError on some interfaces

Published: | Categories: DOM


Since Firefox 23, the non-standard watch method, which allows developers to observe changes made to object properties, throws a TypeError if the object is Document, HTMLSelectElement or probably some other DOM element interfaces. A workaround is to use a Proxy. Note that watch and unwatch may be removed in the future, and you should avoid using those Firefox-specific methods. This regression has been fixed with Firefox 27.