Matt-Esch/vtree — pull request #19 by Matt-Esch (2014-11-12 11:38:43+00:00)
Title: Thunk indexing

@neonstalwart I think this is the solution we are looking for to destroying widgets across thunk boundaries. As I mentioned on your PR, evaluation of the thunk before diff defeats the purpose of the thunk, so we need another solution. The two solutions I could think of were:

- Either have thunks state that they will have widgets
- Or assume that thunks might have widgets

The first option seemed like a poor usability point, so I opted for the second, adding a hasThunks key. This also probably helps with debugging and inspection anyway.

While looking over thunks I noticed a bunch of indexing issues with thunks, so please look over this carefully. A follow up diff is coming in vdom to patch the dom indexing logic.

For completeness I also added code to jump the thunk boundary when executing hooks, but note that this behavior will subsequently be removed to favor "soft hooks" for performance.