Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30886
| Path | csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: getElementsByClassName only inserts first image into canvas after ruby each loop |
| Date | Sun, 17 Jul 2016 16:02:38 +0200 |
| Organization | solani.org |
| Lines | 31 |
| Message-ID | <nmg35i$n02$1@solani.org> (permalink) |
| 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> <nmf1pg$qgi$1@dont-email.me> <87zipgjv0p.fsf@bsb.me.uk> <nmfvrn$9v6$1@solani.org> <87twfojt91.fsf@bsb.me.uk> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | solani.org 1468764146 23554 eJwNycERwDAIA7CV8AWbsg4E9h+h+Uo8gjpclHO57natGyhN4Rkb304JdSIzmh2TdiPfeOQPFmAQsQ== (17 Jul 2016 14:02:26 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Sun, 17 Jul 2016 14:02:26 +0000 (UTC) |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
| X-User-ID | eJwFwYEBwCAIA7CXEEvBc5TR/09YEpuLnWAQoVC5pj2/AVpuldNNqWQUns3Tpt91ZSWc8341xBH/ |
| In-Reply-To | <87twfojt91.fsf@bsb.me.uk> |
| Cancel-Lock | sha1:qglZMMR1CP7ZK5t85EZW3GdQDhU= |
| X-NNTP-Posting-Host | eJwFwYEBwDAEBMCVivhnHCH2H6F3bhA0DxzH11djho8QHQvoOmjJ1yXtiXx1Qcbiu5MTUj8SfRD2 |
| Xref | csiph.com comp.lang.javascript:30886 |
Show key headers only | View raw
On 17.07.2016 at 15:20, Ben Bacarisse wrote:
> "Christoph M. Becker" <cmbecker69@arcor.de> writes:
>
>> On 17.07.2016 at 14:42, Ben Bacarisse wrote:
> <snip>
>>> window.addEventListener(
>>> 'load',
>>> function () {
>>> var odiv = document.getElementById('out');
>>> var as = document.getElementsByTagName('a');
>>> for (var i = 0; i < as.length; i++) {
>>> as[i].addEventListener(
>>> 'click',
>>> function (evt) {
>>> odiv.innerHTML = evt.target.innerHTML;
>>
>> Don't we want to call `evt.preventDefault()`?
>
> I general, yes, but I don't think it matters here (the anchor elements
> have no attributes) and I was aiming for the least distraction. Does it
> matter in this case?
Frankly, I don't know (probably not), because I always set href
attributes for a elements (except when I use the name attribute, but I
don't do this anymore). Otherwise using an a element doesn't make much
sense to me; I'd prefer a span in that case.
--
Christoph M. Becker
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
getElementsByClassName only inserts first image into canvas after ruby each loop plowry05@gmail.com - 2016-07-09 21:07 -0700
Re: getElementsByClassName only inserts first image into canvas after ruby each loop JJ <jj4public@vfemail.net> - 2016-07-10 20:16 +0700
Re: getElementsByClassName only inserts first image into canvas after ruby each loop howtovideos3421@gmail.com - 2016-07-10 08:40 -0700
Re: getElementsByClassName only inserts first image into canvas after ruby each loop patrick lowry <plowry05@gmail.com> - 2016-07-10 08:44 -0700
Re: getElementsByClassName only inserts first image into canvas after ruby each loop Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-11 01:21 +0100
Re: getElementsByClassName only inserts first image into canvas after ruby each loop patrick lowry <plowry05@gmail.com> - 2016-07-15 20:59 -0700
Re: getElementsByClassName only inserts first image into canvas after ruby each loop "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-07-16 09:21 +0200
Re: getElementsByClassName only inserts first image into canvas after ruby each loop Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-16 13:19 +0100
Re: getElementsByClassName only inserts first image into canvas after ruby each loop Osmo Saarikumpu <osmo@weppipakki.com> - 2016-07-17 07:32 +0300
Re: getElementsByClassName only inserts first image into canvas after ruby each loop Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-17 13:42 +0100
Re: getElementsByClassName only inserts first image into canvas after ruby each loop "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-07-17 15:06 +0200
Re: getElementsByClassName only inserts first image into canvas after ruby each loop Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-17 14:20 +0100
Re: getElementsByClassName only inserts first image into canvas after ruby each loop "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-07-17 16:02 +0200
Re: getElementsByClassName only inserts first image into canvas after ruby each loop patrick lowry <plowry05@gmail.com> - 2016-07-17 05:56 -0700
Re: getElementsByClassName only inserts first image into canvas after ruby each loop patrick lowry <plowry05@gmail.com> - 2016-07-17 05:51 -0700
Re: getElementsByClassName only inserts first image into canvas after ruby each loop Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-17 14:23 +0100
Re: getElementsByClassName only inserts first image into canvas after ruby each loop Martin Honnen <martin.honnen@gmx.de> - 2016-07-17 15:34 +0200
Re: getElementsByClassName only inserts first image into canvas after ruby each loop patrick lowry <plowry05@gmail.com> - 2016-07-17 18:03 -0700
csiph-web