watch

watch (JavaScript)

[1] 903332 – document.watch() results in "TypeError: can't watch non-native objects of class Proxy" ( ( 版)) <https://bugzilla.mozilla.org/show_bug.cgi?id=903332>

[2] Object.prototype.watch() - JavaScript | MDN ( 版) <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch>

[3] An update on Object.observe ( 版) <https://esdiscuss.org/topic/an-update-on-object-observe>

>I agree with Benoit and I think there is a reason Object.prototype.watch is still in Firefox and won't go away any time soon

As far as I know the only reason it's there and hasn't been removed is because it's used to implement debugger watchpoints [1]. And the only reason it's web-exposed is because SpiderMonkey has not prioritized being able to expose APIs to privileged code but not the web (something that think should get fixed).

[1] bugzilla.mozilla.org/show_bug.cgi?id=934669