mojito
mojito copied to clipboard
[bz4993611] client runtime must keep track of mojit hierarchy when new mojits are dispatched
Initially when the Mojito Client is initialized, the binderMap sent from the server is used to create MojitProxy objects, and each one contains a config object with 'children' if there are any. This state is only the original state of the page, so when any mojits are dispatched that create new binders on the page (and new MojitProxy objects), the state of the parent binder is not updated, and there is no way for mojits to know the current state of its children.
Mojit binders must be able to have info about their current child state in order to destroy their children, otherwise they can only destroy the children defined in the original page state.
This bug must be fixed before I can remove the automatic binder cleanup, because binders must be able to destroy their children programmatically (even those that have appeared after the initial page state).