<embed src="scripted-svg.svg" type="image/svg+xml" width="200" height="200">
I couldn't get it working with README.md, so tipping the hat to the author!
The only problem and with the experience I got trying using it, is that the concept of viewport is botched. I was hoping that the embedded JS would have working metrics for the viewed width/height, which it does not.
That means that mouse events and such have transformed coordinates, not matching the position of the cursor.
I have this small project demonstrating the ways embedded JS gets rendered. I think I'm going to revise it and see if both projects can be merged.