Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: addEventListener question Date: Sun, 12 Aug 2018 18:06:13 +0200 Organization: solani.org Lines: 19 Message-ID: References: <5b6dbba7$0$2957$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1534089968 28524 127.0.0.43 (12 Aug 2018 16:06:08 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 12 Aug 2018 16:06:08 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 Cancel-Lock: sha1:1YJ+VH/hup6K9KBCZD6PSS4abeM= Content-Language: de-DE In-Reply-To: X-User-ID: eJwNyckBwCAIBMCWuHaRclBD/yWY+Q6cypNBMDCY1L7dlhnyx4jZQlzb5fuoln+xpCOxa5IUewddEAk= Xref: csiph.com comp.lang.javascript:35466 On 12.08.2018 at 17:46, Thomas 'PointedEars' Lahn wrote: > Christoph M. Becker wrote: > >> On 10.08.2018 at 18:21, Luuk wrote: >> >>> if (links[index].innerHTML== links[index].innerText) { abc++; } >> >> I'd prefer (assuming HTML): >> >> if (links[index].tagName === "DT") { abc++; } > > const LINK = links[index]; > if (LINK.tagName.toUpperCase() == "DT") { ++abc; } Thanks! Indeed, I've missed the .toUpperCase(). -- Christoph M. Becker