function getAttrs(element) {
  return Array.from(element.attributes).reduce((attrs, attr) => {
    attrs[attr.name] = attr.value;
    return attrs;
  }, {});
}
Get the attributes of an HTML element.
@param {HTMLElement} element
@returns {Object}