Reply To: html layout/event times/selector vs. scale/ compatibility

PennController for IBEX Forums Support html layout/event times/selector vs. scale/ compatibility Reply To: html layout/event times/selector vs. scale/ compatibility



The more often you update the values of the Var elements, the less likely it is that participants see a message due to an outdated, empty Var element, so that reasoning would suggest to lower the value of 10. However, it’s quite unlikely that a participant would type any text and validate their answer in less than 10ms

It could be that execution is slowed down and the Timer is not actually run every 10ms but much less frequently. You could try using the javascript function window.requestAnimationFrame instead, which is optimized to execute loops:

Template("ansa_template.csv", row =>
    ...[ Array(20)].map( (v,i) => newVar("ansa_"+Number(i+1),"").global() )
    newFunction( ()=>{
      const currentPennController = document.querySelector(".PennController-PennController");
      const checkBlanks = () => {
          .forEach( (v,i) => getVar("ansa_"+Number(i+1)).set(v.value)._runPromises() );
        if (currentPennController == document.querySelector(".PennController-PennController"))
          window.requestAnimationFrame( checkBlanks );

Did you also double-check your tests on the Var element, and whether what the participant typed in the boxes is indeed supposed to satisfy those tests when they see the messages?