I want to put all attributes in a Html element into an array: like i have a jQuery Object, whichs html looks like this:
Element.prototype.getA = function (a) { if (a) { return this.getAttribute(a); } else { var o = {}; for(let a of this.attributes){ o[a.name]=a.value; } return o; } }
having ... can use
...
mydiv.getA() // {id:"mydiv",a:'1',b:'2'}