It make sens to use "event" binding in your case.
Because there are only two ways to notify subscribers of observable variable: beforeChange
and change
.
In knockoutJs code there is simple chain of if blocks which check if event is specified, and if event is equal to beforeChange
. That's basically all logic which goes there, so no other events fired.
Part form knockoutJS which implements this logic:
self["notifySubscribers"] = function(value, event) {
if (!event || event === defaultEvent) {
self._rateLimitedChange(value);
} else if (event === beforeChange) {
self._rateLimitedBeforeChange(value);
} else {
self._origNotifySubscribers(value, event);
}
};