function getElData(el, defaults) {
  defaults = defaults || {};
  var data = {};
  Object.keys(defaults).forEach(copyAttribute);
  function copyAttribute(key) {
    if (el.hasAttribute(key)) {
      data[key] = el.getAttribute(key);
    }
  }
  return data;
}
Extracts data from the element given an object that contains expected keys.

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