- From: smaug---- <notifications@github.com>
- Date: Tue, 24 Nov 2015 08:28:26 -0800
- To: whatwg/dom <dom@noreply.github.com>
Received on Tuesday, 24 November 2015 16:29:02 UTC
So getAttributeNames() would return a new sequence<DOMString> each time? Are we concerned about silly usage like for (var i = 0; i < elem.getAttributeNames().length; ++i) { // do something with elem.getAttributeNames()[i]; } It is just that .attributes doesn't change, so fewer new objects there. Would something like readonly attribute FrozenArray<DOMString> attributeNames; work, and in such way that it is replaced with a new array whenever an attribute is added or removed? But I don't object getAttributeNames(). --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/115#issuecomment-159323493
Received on Tuesday, 24 November 2015 16:29:02 UTC