Download:
DrawLineSVG-mutation.hype.zip (17,5 KB)
One could also just set the innerHTML to a SVG markup to avoid SVG.js. This is pretty small and brute force, and doesn't even care to manipulate an existing SVG (potential optimization here).
Download:
DrawLineSVG-mutation-markup.hype.zip (20,2 KB)