Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: getElementsByClassName only inserts first image into canvas after ruby each loop Date: Sun, 17 Jul 2016 13:42:30 +0100 Organization: A noiseless patient Spider Lines: 54 Message-ID: <87zipgjv0p.fsf@bsb.me.uk> References: <3397987e-7925-4c49-8a94-d5f12a152223@googlegroups.com> <87lh192ff0.fsf@bsb.me.uk> <267f7082-d654-4a09-81d6-78f90e2a1fe6@googlegroups.com> <8760s5n5b3.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="4184"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+m9kHcsfbVWWgptKlO7G5yWuXyJnCyLu4=" Cancel-Lock: sha1:F2zgVDtDmx+qlQpbFrOIeri+eWI= sha1:qYCVV/xUDu2ry4Cgajib9r/qpPU= X-BSB-Auth: 1.33898e85ffb98968528c.20160717134230BST.87zipgjv0p.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:30879 Osmo Saarikumpu writes: > On 16/07/2016 15:19, Ben Bacarisse wrote: >> Here is a very >> bare example In plain ECMAScript: > ... >> } >> } >> }, >> false); >> > > Nice, but there is an extra closing curly brace. Thanks for spotting that. Even the indentation shows that there's one too many so I don't know how I missed it. Corrected: Click test
ONE TWO
In case the OP missed the key part: the event handler is passed an event object that has a 'target' property giving the element on which the event fired. -- Ben.