Home > @world-wide-lab/integration-jspsych > jsPsychWorldWideLab > initJsPsych
jsPsychWorldWideLab.initJsPsych() method
Initialize JsPsych with the World-Wide-Lab integration.
Signature:
typescript
static initJsPsych(jsPsychOptions: JsPsychOptions, setupOptions: SetupOptions): JsPsych;
Parameters
Parameter | Type | Description |
---|---|---|
jsPsychOptions | Options to pass to the JsPsych initialization function. | |
setupOptions | Options to pass to the World-Wide-Lab Integration setup function. |
JsPsych
The initialized JsPsych instance.
Remarks
This function is a wrapper around initJsPsych(). It sets up the World-Wide-Lab integration and wraps the on_trial_finish and on_finish functions to automatically save data.
When using this function, you **must not** call jsPsychWorldWideLab.setup() separately, this function already does this for you.