HotDrink / hotdrink

JavaScript MVVM library with support for multi-way dependencies and generic, rich UI behaviors.
http://hotdrink.github.io/hotdrink/
58 stars 9 forks source link

Unbinding #19

Open thejohnfreeman opened 12 years ago

thejohnfreeman commented 12 years ago

Binders that remove elements from the DOM should unbind those elements instead of expecting them to unbind the next time they are notified, which adds unnecessary work to the common case of living subscriptions.

I believe this will let the if binder bind simply once, instead of destroying, re-creating, and re-binding DOM nodes every time the if-bound value changes.