Google Groups

Re: Roadmap to KO 1.3

Noel Abrahams Oct 13, 2011 4:39 AM
Posted in group: KnockoutJS
Thanks, RPN, the custom binding is working as expected.

However, it doesn't seem to be the most efficient way to deal with this.

In the sense that we have the following:
  • The bound values are first written to the VM from the DOM.
  • But this triggers the ko.observable change event (on the VM).
  • And so the VM value is then written back to the DOM via an Update callback.
I think my use case of initialising the VM via the DOM is a common one, and should be optimal (i.e. handled organically by KO) - especially considering the case of hundreds of DOM elements bound through this mechanism.

Let me know if I missed something or if there is a way to stop the update callback from triggering unnecessarily.