W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2011

Re: problems with §4.2.19 Arrays

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 1 Jun 2011 10:21:11 +1200
To: Ms2ger <ms2ger@gmail.com>
Cc: David Flanagan <dflanagan@mozilla.com>, public-script-coord@w3.org
Message-ID: <20110531222110.GB31214@wok.mcc.id.au>
Ms2ger:
> In any case, we can't use NamedNodeMap, as Attrs aren't Nodes.

Didn’t realise that had changed.

> However, we don't expect many pages to use attributes in other ways
> than by looping through them. In particular, even if we didn't use
> the WebIDL array type, we would replace NamedNodeMap with something
> like
> 
> interface AttrList {
>   getter(unsigned long index);
> };
> 
> unless that breaks a significant number of sites. I certainly don't
> expect to change the specification until it has been implemented by
> a mainstream browser.

>From a quick search there seems to be uses of the methods on
Element.attributes:

http://www.google.com/codesearch?q=attributes.item+lang%3Ajavascript
http://www.google.com/codesearch?q=attributes.getNamedItem+lang%3Ajavascript
http://www.google.com/codesearch?q=attributes.setNamedItem+lang%3Ajavascript
http://www.google.com/codesearch?q=attributes.removeNamedItem+lang%3Ajavascript

Less so for the NS versions.  I don’t know if that counts as
significant.

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Tuesday, 31 May 2011 22:21:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC