Immediately after switching the page, it will work with CSR.
Please reload your browser to see how it works.
The major browsers have no issues with this, though note that some tools like Inkscape won't parse the DTD nor expand the entities.
[0] https://kingbird.myphotos.cc/packing/squares_in_squares.html
The frontend would basically call an API that would return an SVG image with the right colour assigned and the animation done by hiding and showing svg elements.
You can see an example here: https://web.archive.org/web/20221020133516im_/https://uncrow...
Now, take SVG, it has potential to do everything what SWF could. But there is no editor like Flash and scene/object based coding solution like ActionScript. And each browser has own quirks so only simple SVG is guaranteed to be displayed everywhere.
Slides: https://slides.com/sdrasner/svg-can-do-that
Video: https://youtu.be/ADXX4fmWHbo?si=6YPZkopyEDc8PSte