Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: How to replace a class? Date: Thu, 10 Nov 2016 23:20:21 +0100 Organization: PointedEars Software (PES) Lines: 28 Message-ID: <1844095.KlZ2vcFHjT@PointedEars.de> References: <5a64eafc-a7f3-44e2-88ce-fe388101ecba@googlegroups.com> <28c08bf8-fb92-4487-acd1-10f9ea445d16@googlegroups.com> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1478816422 18973 eJwFwQkBwDAIA0BL0PDKWWHxL6F3jtCYtPAwp3NTceQXM60BpU+tQNiUq12oi+TERC2+bX0CPxBy (10 Nov 2016 22:20:22 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 10 Nov 2016 22:20:22 +0000 (UTC) User-Agent: KNode/4.14.2 X-NNTP-Posting-Host: eJwFwQERADEIAzBLK9ByyHk28C/hE7qgmyEquNzFQ3ZMJPF5+0x1lp3HEo6Fie631zC8HfgBE2sQkg== Cancel-Lock: sha1:yGsirWEEIA5EMxZJfMck3wQ3DpE= X-User-ID: eJwFwYkBgDAIA8CVeJKg41Aq+4/gHVOuKYgClzsw+1AWn9veLJWHn3kQ8n2phCnV2TXkxHhDOJ0Vx67t/CJEFHw= Xref: csiph.com comp.lang.javascript:31674 Evertjan. wrote: >> // define line class > > That is not defining a class, > that is just making a pointer to a collection of elements. There are no pointers in these languages (except in the low-level implementation). The proper term is _reference_. >> let lineC = document.getElementsByClassName('Line'); > > So this is a collection of elements. It is not a collection, but a node list (an object implementing the NodeList interface); by contrast, the items of a collection (an object implementing the HTMLCollection interface, for example) can also be addressed by non- numeric index, by the name of an item, using the bracket property accessor or calling the namedItem() method (with a string parameter). Your From header field still violates network standards and Netiquette. As to the former, read . -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.