Looking through the code, I found this line, which makes it possible to inject a piece of Javascript into the “main skeleton” of the reviewer HTML.
However it seems this feature is not supported on any other Anki implementation.
One of my main gripes with writing JavaScript for Anki, is that I can’t preload anything, but have to load everything from the template text, making site performance a big issue. There are of course hooks for inserting JS, however hooks don’t work on other Anki platforms.
Having a way to insert JavaScript by writing to the collection config would alleviate this issue.