I used python's http.server module to host the game's files on localhost:8000 and the game works fine in a browser.
It tends to work better in Chrome-based browsers from my experience, though, so I'd recommened ungoogled chromium for that.