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

Re: [DOMCore] Attr

From: Joćo Eiras <joao.eiras@gmail.com>
Date: Fri, 10 Sep 2010 22:17:54 +0100
To: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vit5f4gzjz3wb9@coruscant>

> 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);
> };
>

Can't you reuse something like NamedMap<Attr> ?
Received on Friday, 10 September 2010 21:18:31 GMT

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