I wanted to say that sounds like too much to make available to web apps at all, but nope, apparently it’s indeed a thing that a website can tell your computer to do[1]. I don’t see an option to do that here either, though. I guess your choices are to submit a pull request[2] adding that capability or to use a manual systemwide toggle (I use Keep Awake![3] on GNOME Shell and Coffee[4] on Android).
Just a few lines of script and you are done. I think it was a reaction to sites playing a hidden video, which was just a waste. Even works on my Ubuntu laptop.