Currently we use functions to pass around the jsPsych object as it is not global to the window. A little bit of explanation as to why that's necessary would probably be a good thing!
The jsPsych object must be called from inside the trial object itself in order to have access to the data.
This is an anomaly because jsPsych is a class
It's fine to pass around the class it's just a matter of when the object is actually used
The build_Trial function is called when the timeline is built not run. Only the callbacks inside a trial are executed when a trial is run
Almost any key in the trial object can be a callback function!
Currently we use functions to pass around the
jsPsych
object as it is not global to the window. A little bit of explanation as to why that's necessary would probably be a good thing!jsPsych
is a classbuild_Trial
function is called when the timeline is built not run. Only the callbacks inside a trial are executed when a trial is run