ahdinosaur / nocms

http://dinosaur.is/nocms
2 stars 1 forks source link

idea: observe the dom to update the virtual dom data #4

Open ahdinosaur opened 9 years ago

ahdinosaur commented 9 years ago

@mmckegg has an idea, instead of only listening to changes in the virtual dom data to trigger re-renders of the dom, what if we had two-way data binding between the dom and the virtual dom data: when the dom changes, we update the virtual dom data; when the virtual dom data changes, we update the dom (as we already do).

benefits:

open questions:

mmckegg commented 9 years ago

https://developer.mozilla.org/en/docs/Web/API/MutationObserver