How do I make the background black when a switch is flipped?

But you can see how fragile it is. If Wix decides one day to remove or change the html element with id = “SITE_BACKGROUND”, it’ll throw an error.
So it’s risky, and you’re better avoid that if you have any other choice.

P.S. I put it here as you asked for an example, but I’m going to delete it, as it’s prone to errors, and it’ll be better if users avoid it completely.