Skip to content

trigger events when processing bindings  #6

Description

@mbest

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions