Which browsers support Object.observe?

江枫思渺然 提交于 2019-11-29 21:18:39

No browsers. If its not true today, it will be true someday, and then this can be the accepted answer.

You can use kangax's Browser Compatibility Table for Object.observe

It is part of ECMA Script 7 Specifications, it seems. Luckily, at the time of this writing, my current browser, Chrome 33, is the only one which supports it :)

If you like to enable it in Chrome 33,

  1. Visit chrome://flags/

  2. And enable Enable Experimental JavaScript

Polymer is a new and promising framework that intends to implement Web Components, for which Object.observe() is an integral part.

It provides polyfill implementation for "evergreen" browsers; the latest ones available. Moreover, they track what browser have native support for this feature, so it speeds up their implementation.

This polyfill is available as a separate library on GitHub.

Chrome 35+ supports Object.observe() Method.

More details here: html5rocks

Update: It's moved to chrome 36 beta.

It used to be present in both Chrome & Opera, but the feature has been removed from both browsers after the standards committee withdrew the proposal for this feature!

Chrome 36+, Opera 30+. My favorite way of answering these questions is http://caniuse.com. It's clear, consice, and has instant search.

Disclaimer: I'm the author of object-observer library.

basarat's answer is definitelly the right one - nowadays no browser supports it.

Most of the polyfills performing 'dirty-checks' - not the best way to achieve observance IMHO.

Better way is to pick up one of the several libraries providing the same functionality utilizing native Proxy capabilities, object-observer being just one of them.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!