Which browsers support Object.observe?

前端 未结 7 1308
我寻月下人不归
我寻月下人不归 2020-12-23 15:55

Which browsers, if any, support Object.observe? I\'m surprised I\'m unable to find any info on this.

(And are you aware about any estimated times of arr

相关标签:
7条回答
  • 2020-12-23 16:35

    Chrome 35+ supports Object.observe() Method.

    More details here: html5rocks

    Update: It's moved to chrome 36 beta.

    0 讨论(0)
  • 2020-12-23 16:40

    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

    0 讨论(0)
  • 2020-12-23 16:44

    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.

    0 讨论(0)
  • 2020-12-23 16:44

    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!

    0 讨论(0)
  • 2020-12-23 16:50

    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.

    0 讨论(0)
  • 2020-12-23 16:52

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

    0 讨论(0)
提交回复
热议问题