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

RE: What is the DOM4 Attr interface used for?

From: Roy Walmsley <roy.walmsley@ntlworld.com>
Date: Sat, 20 Feb 2016 19:46:42 -0000
To: "'Anne van Kesteren'" <annevk@annevk.nl>
Cc: <www-dom@w3.org>
Message-ID: <012001d16c17$6c6d8720$45489560$@ntlworld.com>

Many thanks for your response.

While I understand how the situation arose, it still doesn't solve the problem of the level 4 specification. As it stands at the moment, the "Attr" interface is not included either directly or indirectly in the "Element" interface. Consequently, elements have no attributes. So it is effectively impossible to implement.

I can see that the "NamedNodeMap" interface is defined in the level 3 core, so cannot be changed without breaking level 3 and lower. Why don't you redefine it in Level 4 with the current definition from the living standard?

Leaving the level 4 specification in its current state requires, at the very least, a red comment highlighting the problem to users.



-----Original Message-----
From: Anne van Kesteren [mailto:annevk@annevk.nl] 
Sent: 19 February 2016 13:40
To: Roy Walmsley
Cc: www-dom@w3.org
Subject: Re: What is the DOM4 Attr interface used for?

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.


> 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,

Received on Saturday, 20 February 2016 19:47:12 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 20 February 2016 19:47:20 UTC