W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2016

Re: What is the DOM4 Attr interface used for?

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 19 Feb 2016 14:39:59 +0100
Message-ID: <CADnb78g2bK56Ku3oj7CYxF4M99xLgC5Xpe02KFc7FE=DRJETTA@mail.gmail.com>
To: Roy Walmsley <roy.walmsley@ntlworld.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>
Hi Roy,

Welcome to the DOM community. These days we mostly hang out in
https://github.com/whatwg/dom and https://wiki.whatwg.org/wiki/IRC.

On Wed, Feb 17, 2016 at 4:39 PM, Roy Walmsley <roy.walmsley@ntlworld.com> wrote:
> I, as a DOM novice, have been studying the DOM4 specification available
> on-line at https://www.w3.org/TR/dom/.

It's unfortunately not very clear, but you want to study
https://dom.spec.whatwg.org/ instead.


> I make the assumption that, previously, individual “Element” attributes were
> defined as “Attr” objects which, inheriting the “Node” interface, could be
> listed in a “NamedNodeMap” attribute.

Correct.


> Now, however, it seems to me, that “NamedNodeMap” is not an appropriate type
> for the “attributes” attribute in the “Element” interface.

It's not a correct name, but since it was only ever used by
attributes, changing the type of the things it holds is actually
possible. Having said that, we might have to change Attr objects back
to being Attr node objects. It's a little up in the air.


> As I said at the start, I am a novice to the DOM, albeit that I have many
> years programming experience. So, apologies if I have this wrong. I would be
> very grateful for clarification.

You're correct that it's a little weird, but unfortunately we cannot
right all wrongs, just a handful.

Kind regards,


-- 
https://annevankesteren.nl/
Received on Friday, 19 February 2016 13:40:28 UTC

This archive was generated by hypermail 2.3.1 : Friday, 19 February 2016 13:40:36 UTC