You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Element.prototype.attributes requires allocating all the Attr node instances and the NamedNodeMap itself which is expensive, lots of frameworks (ex. Polymer, Angular, others) just want to iterate the attributes at construction time of an element or when traversing the document and don't need these expensive persistent structures.
Instead we should provide getAttributeNames(), then authors can use that with getAttribute/setAttribute/removeAttribute which results in better memory usage and performance.
This would also get developers to stop using .attributes which means the usage of the exotic Node like thing would go down possibly allowing the removal of it in the future.