//Element.attributes returns NamedNodeMap, to convert this into an Object Object.assign({},...Array.from(element.attributes, ({name, value}) => ({[name]: value})))