[whatwg] getValues on PropertyNodeList is now redundant

6 views
Skip to first unread message

Ojan Vafai

unread,
Mar 30, 2012, 5:21:42 PM3/30/12
to whatwg
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist

DOM4 now has NodeList inherit from Array (see
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-nodelist).
As such, the getValues function is no longer useful. PropertyNodeList
should just be a regular NodeList.

Ojan

Erik Arvidsson

unread,
Mar 30, 2012, 5:59:40 PM3/30/12
to Ojan Vafai, whatwg
I'm not sure. getValues returns an array of the itemValue of the nodes
in the NodeList. Something that can be trivially implemented as:

PropertyNodeList.prototype.getValues = function() {
return this.map(function(node) {
return node.itemValue;
});
};

If this is commonly used then it might make sense to keep it so that
not every application has to duplicate this code.

erik

Reply all
Reply to author
Forward
0 new messages