function copyAttribute (key) {
    if (el.hasAttribute(key)) {
      data[key] = el.getAttribute(key);
    }
  }
Extracts data from the element given an object that contains expected keys.

@param {Element} Source element.
@param {Object} [defaults={}] Object of default key-value pairs.
@returns {Object}