Can we use "getElementById" for text components?

URL of experiment: Sign in · GitLab

Description of the problem: I am trying to adjust the “letter spacing” property of text components as the experimental manipulation. I did it successfully for a while but then it abruptly stopped working. This happened back in November 2022 and posted a topic here.

The code that was able to change the letter spacing until it didn’t is presented below:

textComponent._pixi._style._letterSpacing = 50 (this worked on its own for a while until it didn't)

I am now trying alternative routes. I’ve tried changing letter spacing from _pixi._context, _pixi._style ._textMetrics.style; none of these worked.

One of the ways seem to be adjusting the “canvas” or document letter spacing (canvas.style.letterSpacing or document.style.letterSpacing). However, I am not sure how we index canvas or document within psychoJS.

Any help would be appreciated.