- From: Elliott Sprehn <notifications@github.com>
- Date: Fri, 20 Nov 2015 21:27:08 -0800
- To: whatwg/dom <dom@noreply.github.com>
Received on Saturday, 21 November 2015 05:27:38 UTC
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. @domenic @foolip --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/115
Received on Saturday, 21 November 2015 05:27:38 UTC