Re: Named access to elements

Thanks for the answers!

I am eargerly expecting the next public draft.

In the current draft DOM HTML 1 the id attribute is not described in the text, it
just appears in the IDL.

Regards,

Antoine.

Lauren Wood wrote:

> At 30/06/98 06:14 AM , Antoine Bertier wrote:
> >Hello everybody,
> >
> >I am trying to understandand how the DOM provides named access to
> >elements, at least HTML elements but why not to core elements too.
>
> It's more difficult for Core elements, since something called "ID" may not
> in fact be one, and something with another name may be an ID. So we have to
> come up with a generalised method. We will be doing this after Level 1 is out.
>
> >The IDL for  HTMLElement specifies an 'id' attribute, which I assumes
> >has the same semantics as the HTML 4.0 ID attribute. For the IMG element
> >specifies a 'name' attribute for compatibility reasons.
>
> Yes, the id attribute is the ID attribute - HTML does not have
> case-sensitivity.
>
> >I see the images() methods to get a NamedNodeList which I assumes allows
> >to find an IMG element by its 'name' attribute or by its 'id'
> >attribute... The same goes for applets, links, forms and anchors.
>
> Yes.
>
> >However since all elements have an ID in HTML 4.0 I expect to be able to
> >access any element by its document wide ID (DIV elements for instance).
> >How do I do that ?
>
> This is currently being discussed in the DOM WG and there will be a method
> in the next public draft to access elements by their unique ID.
>
> Lauren

Received on Wednesday, 1 July 1998 04:14:29 UTC