Konwertuj nazwę Nodemap na obiekt
//Element.attributes returns NamedNodeMap, to convert this into an Object
Object.assign({},...Array.from(element.attributes, ({name, value}) => ({[name]: value})))
Envious Echidna