The on_trial_finish event and the on_data_update event both are only called once, inside the finishTrial method:
// handle callback at whole-experiment level
this.opts.on_trial_finish(trial_data_values);
// after the above callbacks are complete, then the data should be finalized
// for this trial. call the on_data_update handler, passing in the same
// data object that just went through the trial's finish handlers.
this.opts.on_data_update(trial_data_values);
They are called side by side, and have the same data object passed to both, so at least personally, I do not think that the existence of on_data_update is actually necessary in the way it is currently working in, and it might probably be better to simply remove this.
The
on_trial_finishevent and theon_data_updateevent both are only called once, inside thefinishTrialmethod:They are called side by side, and have the same data object passed to both, so at least personally, I do not think that the existence of
on_data_updateis actually necessary in the way it is currently working in, and it might probably be better to simply remove this.