kangax/fabric.js — pull request #1686 by asturur (2014-09-20 09:34:49+00:00)
Title: Fix for styles and gradient overwriting

This is a proposal for fixing issue #1329 .

Style and gradients get theyr own svgUid unique id to be retrieved later by the owner document.
This fix is necessary just when more svg get parsed very fast and they can overwrite fabric global variables.
It is more frequent for gradient than for style anyway.

I used setAttribute and getAttribute on elements, i don't know if performance wise is fine, or if it would be better a simple element.svgUid = myVar.