Inserting SVG images as DOM nodes instead of inserting them as images or objects. In this example, we load an image stored as JST templates and insert the image into the DOM, allowing to modify its style via CSS and its attributes with JavaScript.
In this gist, we change the whale color and make it move using D3.