Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert namednodemap to object

//Element.attributes returns NamedNodeMap, to convert this into an Object
Object.assign({},...Array.from(element.attributes, ({name, value}) => ({[name]: value})))
 
PREVIOUS NEXT
Tagged: #convert #namednodemap #object
ADD COMMENT
Topic
Name
4+4 =