Hi there,
I’ve found this cool simple open source script that renders a Space Invaders game in your browser and I’m using that for my custom 404 page. I’ve added the game.js code to my custom page JS, and created a raw HTML element containing the container and the script call, but the custom JS is loaded after the body, meaning the trigger to run the script comes before the script is loaded.
I’ve tried copying the whole script in a tag in the RAW element, but that brings all kinds of rendering errors.
So, how do I load the custom JS script before the element is rendered in the DOM?