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.
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!