I think about this from time to time, and i think it’s got to do with the pipeline of creation, distribution, and presentation. With Flash, you had an obvious piece of graphical software to create your thing, and when you were done you had one file you could upload anywhere that would accept it. Once it was uploaded somewhere, it could be served up as simply as an image, at the stated size, and it would work.
So it was all obvious and encapsulated.
I would like a generally agreed upon encapsulated html standard. Single-file sites that can be served as simply as media.
Although there is no agreed upon standard for encapsulated single-file web content, you can try to run your finished product through SingleFileZ or single-filez-cli, and ship that around, or embed it with an Iframe. I'm just not sure if it's suitable for games or application that load static assets upon certain interaction.
Flash games and animations often had a lot of static assets, like sound, bitmap images, or fonts. You could data-uri all that in your html file, too, but with all the base64 overhead it might be a good idea to compress everything afterwards (e.g. SingleFileZ, see my other comment). Of course only if file shipment is an issue for you, otherwise relying on your server's gzip compression might be enough.
Try xz compression and put in a blob and then and put in wasm (C or rust for best performance). You can inline the wasm in single html file along with js and css. At load time, in wasm, you can decompress and instantiate the elements/objects/records from parsing the blob. You can keep in wasm or copy/move to js land. Sounds like a lot but it's pretty easy.
So it was all obvious and encapsulated.
I would like a generally agreed upon encapsulated html standard. Single-file sites that can be served as simply as media.