The routine to get typed response does not show up at all and is skipped in Pavlovia

Have a look at my crib sheet. If you define certain variables or import PolyFill in “code_JS” then you don’t need to make these manual translations.

You may also find my Free Recall demo useful (see my online demos) though that instance is probably more complicated than you need.