code: function parseAttributes(element, attributes) {
  
      if (!element) {
        return;
      }
  
      var value,
          parsed,
          parentAttributes = { };
  
      // if there's a parent container (`g` node), parse its attributes recursively upwards
      if (element.parentNode && /^g$/i.test(element.parentNode.nodeName)) {
        parentAttributes = fabric.parseAttributes(element.parentNode, attributes);
      }
  
      var ownAttributes = attributes.reduce(function(memo, attr) {
        value = element.getAttribute(attr);
        parsed = parseFloat(value);
        if (value) {
          // "normalize" attribute values
          if ((attr === 'fill' || attr === 'stroke') && value === 'none') {
            value = '';
          }
          if (attr === 'fill-rule') {
            value = (value === 'evenodd') ? 'destination-over' : value;
          }
          if (attr === 'transform') {
            value = fabric.parseTransformAttribute(value);
          }
          attr = normalizeAttr(attr);
          memo[attr] = isNaN(parsed) ? value : parsed;
        }
        return memo;
      }, { });
  
      // add values parsed from style, which take precedence over attributes
      // (see: http://www.w3.org/TR/SVG/styling.html#UsingPresentationAttributes)
  
      ownAttributes = extend(ownAttributes, extend(getGlobalStylesForElement(element), fabric.parseStyleAttribute(element)));
      return extend(parentAttributes, ownAttributes);
    }
docs: Returns an object of attributes' name/value, given element and an array of attribute names;
  Parses parent "g" nodes recursively upwards.
  @static
  @memberOf fabric
  @method parseAttributes
  @param {DOMElement} element Element to parse
  @param {Array} attributes Array of attributes to parse
  @return {Object} object containing parsed attributes' names/values