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