NYTimes/svg-crowbar — pull request #13 by gka (2014-09-03 17:43:04+00:00)
Title: Explicitly setting styles on all nodes instead of embedding css declaration

In the current version of svg-crowbar the embedding of styles is not working in all situations.

I replaced the old technique with a solution that traverses the SVG DOM and for each element applies all style properties that are different from the default styles of an empty SVG element. The styles are computed using ``getComputedStyles()``.

The original implementation was taken from Stackoverflow though I don't remember where I found it. It works pretty well, but it is comparably slower than the old method.

It might make sense to wait with the getSources() call until the user actually clicked the download.