The SVG Element.attributes property returns an object that contains all the attributes of the given element.
Syntax:
var attr = element.attributes
Return value: This property returns an object that contains all the attributes of the element.
Example 1:
Output:
👁 ImageExample 2:
Output:
👁 Image