diff --git a/src/data/TrialHandler.js b/src/data/TrialHandler.js index 4cba062..995bfde 100644 --- a/src/data/TrialHandler.js +++ b/src/data/TrialHandler.js @@ -122,6 +122,21 @@ export class TrialHandler extends PsychObject } + get trialIterator() { + return this[Symbol.iterator](); + } + + + /** + * Helps go through each trial in the sequence one by one, mirrors PsychoPy. + */ + next() { + const { value } = this.trialIterator.next(); + + return value; + } + + /** * Iterator over the trial sequence. *