20250504

I'm not suggesting this is a good idea but I could easily implement this in Alhena running Graal.js, Rhino or Nashorn. I'm using single ticks to represent a preformatted text block in the following gemtext example.

### My Dynamic Gemini Page
''' script=JS
print("The time is: " + new Date());
'''
Thanks for stopping by!

The JS engine could be sandboxed so it couldn't access Java, the network or the file system. You'd basically be limited to inputs like time, locale and random numbers. The code wouldn't be able to access elements in the rest of the page like JS in HTML.

To be clear, this is only a thought experiment. You couldn't do much beyond random Magic 8 Ball responses, dice throws or date/time output. No slippery slope here.


Source