caitp / watchtower.js-old

MOVED TO https://github.com/angular/watchtower.js
6 stars 3 forks source link

polymer observe #12

Open lookfirst opened 10 years ago

lookfirst commented 10 years ago

how is watchtower better than this?

https://github.com/Polymer/observe-js/blob/master/src/observe.js

I don't know... maybe it is just me, but this project seems like a duplication of effort? Maybe work to improve observe.js instead?

(it's even copyright google. heh.)

caitp commented 10 years ago

This has been discussed in the draft, the plan is to write this code in a pluggable manner so that a native O.o implementation could be used (for certain cases) when it's available. Unfortunately, native O.o currently leaves certain things to be desired (it can't invoke methods or ES5 getter/setters currently, based on Rob's tests), and the polyfill also leaves a lot to be desired as well.

Admittedly, the initial implementation kind of sucks and will need to be refactored a fair bit to make sense for JS, but yes, unfortunately the O.o polyfill doesn't meet all of the requirements (and nor does the native implementation)