Indeed, Proxy always seemed like the more general version of Object.observe. It not only "tells you when state changes", but lets you write code to say what that means.
What's the state of Proxy? Are the people behind it still working on it? Are we going to be able to use it? Will it be fast?
As far as I know Proxy is impossible to polyfill. There are some patches which make old browser versions of Proxy meet the spec, but I just don't think you can close the Proxy gap with pure javascript.
It's possible if you also translate all of the code that uses the polyfilled object by converting every MemberExpression to a function call, but that's probably a nightmare for performance.
what happens when i add a property to the object that i'm proxying after the Proxy is already instantiated? you wouldn't be able to detect the addition and add getters/setters for the property unless you use some sort of O.o or dirty checking on the underlying object.
JavaScript is all over eventing. But such a system requires cooperation or control between those firing and those subscribing to events. When the object we're talking about is e.g. an HTMLIFrameElement and it changes its own height it would be neat to be able to peek into object attribute changes.
No, JavaScript is a language embedded in browsers. Web specifications detailing standard events are all over eventing, because browsers use event loops. On a related matter, Node does, too. JavaScript does not require an event loop.
Any misunderstandings within this system are a misunderstanding regarding DOM events. HTMLIFrameElements don't change on their own. If they change based on the window resizing, you listen to the "resize" event, etc.
It actually does now that Promise got added to the language. For extra fun the interaction of the JavaScript event loop and the HTML/DOM event loop is not actually specified and getting it specified will be rather exciting: both sides want to "own" the event loop...
I wonder how that works in practice outside of web environments, considering the spec doc doesn't mention it anywhere. I get the premise of having Promises in the language requiring an event loop, but without one, you'd be creating objects that never get resolved across frames (since they don't exist), which is still entirely possible.
I guess the only issue is that what happens if you have unresolved promises when your Job queues go empty is implementation-defined, because an implementation is allowed to terminate when there are no Jobs. But if it doesn't terminate, resolving the Promise will enqueue a PromiseReactionJob. And I guess not actually call NextJob; that part is up to the implementation.
Hovering is handled via the HTML/DOM event loop, since it needs to be coordinated with mouseover events.
Animations, though, do need to be worked into this somehow. And they need to be able to run on a completely independent event loop to some extent so you can do animations on the compositor thread, not the DOM thread.