title: How to export SVG with custom attributes in fabric.js?
body: <p>Is there a way to add custom attributes to objects and get them on exported SVG?</p>
  
  <p>I'm using this way for JSON exports. But it's not working for SVG exports.</p>
  
  <pre><code>canvas.item(0).foo = 'bar'; // custom property
  var json = JSON.stringify(canvas.toJSON(['foo'])); // include that property in json
  canvas.clear();
  canvas.loadFromJSON(json);
  canvas.item(0).foo; // "bar" &lt;-- the property is preserved
  </code></pre>
  
  <p>When I export my canvas using canvas.toSVG() the custom attributes will not exported.</p>