RE: What is the DOM4 Attr interface used for?

"Roy Walmsley" <[email protected]> Sat, 20 Feb 2016 19:46:42 -0000
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]>
Anne,

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.

Regards,

Roy


-----Original Message-----
From: Anne van Kesteren [mailto:[email protected]]=20
Sent: 19 February 2016 13:40
To: Roy Walmsley
Cc: [email protected]
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 =
<[email protected]> wrote:
> I, as a DOM novice, have been studying the DOM4 specification=20
> 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 =
=E2=80=9CElement=E2=80=9D=20
> attributes were defined as =E2=80=9CAttr=E2=80=9D objects which, =
inheriting the =E2=80=9CNode=E2=80=9D=20
> interface, could be listed in a =E2=80=9CNamedNodeMap=E2=80=9D =
attribute.

Correct.


> Now, however, it seems to me, that =E2=80=9CNamedNodeMap=E2=80=9D is =
not an=20
> appropriate type for the =E2=80=9Cattributes=E2=80=9D attribute in the =
=E2=80=9CElement=E2=80=9D 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=20
> 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/