jPsych: Access shelf

I know it is possible to access shelf variables when exporting a PsychoPy builder experiment to Pavlovia using some custom javascript code.

Is it also possible to access shelf variables when uploading a jsPsych experiment on Pavlovia? I could not find any documentation on this so far?

Thanks for any suggestions that could be made here :slight_smile:

Have you tried using the JavaScript code?

To follow up, it’s possible in principle using the PsychoJS library, which you have access to anyway if you’re running the experiment on Pavlovia. You might need to reference the psychoJS source code in your header, e.g.,

 <script src="lib/psychojs-2024.2.2.js"></script>

but if you do that you should just be able to use the code in Wakefield’s example to interact with the shelf without further modification.

1 Like

Thanks for the info @wakecarter and @jonathan.kominsky , I was not aware that you could still use the psychojs module within a jsPsych experiment. I will try it out and keep you updated!