I use both. I create SVG files with Inkscape (if and only if I need to draw some complex shapes) and then I display them using the Processing language (the javascript port:)
The Processing parser generate (fast) javascript code on the fly the can be accessed from external scripts. You can mix processing with javascript.