Replies: 1 comment 1 reply
-
Hi hjgodwin, Could you go into a little bit more detail about what exactly it is you are trying to achieve? E.g., what is the participant seeing when you are waiting for an event, what type of event is it exactly, ... Since you mentioned events, JavaScript allows you to define custom events (similar to 'click', 'mousemove', ... events) that you can raise manually. In the code below I have created a custom event and the corresponding event handler simply logs some messages and finishes the current trial. The keyboard response trial starts listening for this event. So you can either finish the trial by pressing a keyboard key. But, you can now also open the developer tools window in your browser, and in the console window raise the custom event using the following code:
This will also finish the trial.
Is this something in the direction you are looking for? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings all, having great fun using jsPsych for making various experiments.
I'm working on a study at the moment that needs to wait for an event before participants can move to the next trial. Is there some way this is possible in jsPsych? To be clear, what I'm thinking of is this:
I've had a look around using various options but can't seem to figure it out.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions