W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: [DOMCore] Attr

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 10 Sep 2010 18:57:19 +0200
To: "Jonas Sicking" <jonas@sicking.cc>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "Ojan Vafai" <ojan@chromium.org>, "Maciej Stachowiak" <mjs@apple.com>, "Boris Zbarsky" <bzbarsky@mit.edu>, "Olli@pettay.fi" <Olli@pettay.fi>, "Adrian Bateman" <adrianba@microsoft.com>, "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vittdt0d64w2qv@anne-van-kesterens-macbook-pro.local>
On Fri, 10 Sep 2010 18:46:27 +0200, Jonas Sicking <jonas@sicking.cc> wrote:
> Oh, another issue is what type the Node.attributes object should be.
> It's currently a NamedNodeMap, but that won't work since those return
> Nodes. We could either create AttrMap interface with the exact same
> API, except that it returns Attrs instead of Nodes, or we can remove a
> few of the functions.
>
> I suggest we remove at least the mutating functions, leaving us with:
>
> interface AttrMap {
>   Attr               getNamedItem(in DOMString name);
>   Attr               item(in unsigned long index);
>   readonly attribute unsigned long   length;
>   Attr               getNamedItemNS(in DOMString namespaceURI,
>                                     in DOMString localName);
> };
>
> But I could even see removing the getNameItem/getNamedItemNS functions  
> too.

In theory they are not needed since there are so many other attribute  
methods around (some of which are marked historical (i.e. obsolete) at the  
moment). We just need to figure out what would break.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Friday, 10 September 2010 16:58:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:40 GMT