Re: What is the DOM4 Attr interface used for?
Anne van Kesteren <[email protected]> Fri, 19 Feb 2016 14:39:59 +0100
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <CADnb78g2bK56Ku3oj7CYxF4M99xLgC5Xpe02KFc7FE=DRJETTA@mail.gmail.com> |
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]> w= rote: > 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 =E2=80=9CElement=E2=80= =9D attributes were > defined as =E2=80=9CAttr=E2=80=9D objects which, inheriting the =E2=80=9C= Node=E2=80=9D 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 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 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, --=20 https://annevankesteren.nl/