Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger events when processing bindings #6

Open
mbest opened this issue Dec 17, 2011 · 1 comment
Open

trigger events when processing bindings #6

mbest opened this issue Dec 17, 2011 · 1 comment
Assignees

Comments

@mbest
Copy link
Owner

mbest commented Dec 17, 2011

Binding themselves can act as a sort of event handler: by creating a custom binding, you can do something when the binding manager first processes the element (init and then update) and whenever the dependencies of that binding change (update). The template binding also include custom event handlers (afterAdd, afterRender, and beforeRemove).

I propose (in addition to #3) to create some new events for Knockout. These would be koAfterInit and koAfterUpdate. koAfterInit is called right after all the binding's init functions have been set up. koAfterUpdate is called after all the binding's update functions have been called. koAfterUpdate will act differently when #1 is implemented. It will still be called after the update functions are run, but it probably won't be all of them that run. It might be nice to include which updates were run.

@ghost ghost assigned mbest Dec 17, 2011
@mbest
Copy link
Owner Author

mbest commented Jan 6, 2012

Code committed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant