W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2016

Re: .getElementsByName()

From: Veli Senol <senol.veli@gmail.com>
Date: Mon, 4 Apr 2016 12:14:07 +0200
Message-ID: <CAOH6sZ6REuHP7SMh4BdV8YppJ-oiC_5YdzFy9tfOaGMXSbsJFA@mail.gmail.com>
To: www-dom@w3.org
hello,

this from the spec:
Note: Elements is the better solution for representing a collection
<https://www.w3.org/TR/dom/#concept-collection> of elements
<https://www.w3.org/TR/dom/#concept-element>. HTMLCollection
<https://www.w3.org/TR/dom/#htmlcollection> is an historical artifact we
cannot rid the web of.

what does that mean in fact?
Does it mean:

document.getElementsByTagName('p')[0] is the better way than using
var paras = document.getElementsByTagName('p');
paras[0];


best regards

2016-03-29 16:17 GMT+02:00 Veli Senol <senol.veli@gmail.com>:

> hello,
>
> please could you give me a pointer in which spec to search for
> .getElementsByName().
>
>
> regards
>
> Veli Senol
>
Received on Thursday, 7 April 2016 20:52:01 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 7 April 2016 20:52:04 UTC