Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #28423
| Path | csiph.com!usenet.pasdenom.info!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: Retrieve a select from a table cell |
| Date | Tue, 14 Jul 2015 23:20:32 +0200 |
| Organization | solani.org |
| Lines | 30 |
| Message-ID | <mo3uer$vnp$1@solani.org> (permalink) |
| References | <mo2utl$9s5$1@dont-email.me> <mo308p$hct$1@solani.org> <1461265.Ovo60OvCif@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | solani.org 1436908827 32505 eJwFwQkBwDAIA0BLa4GwyOH1L6F3JjgoVxjU1va4jC/7wplc+peaPyY4RJfejvIUUKOuAQ8c6xEm (14 Jul 2015 21:20:27 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Tue, 14 Jul 2015 21:20:27 +0000 (UTC) |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| X-User-ID | eJwFwQkBwDAIA0BLa/nlEFL8S9idiR+fUDdXW1tm2Ou64wXlU2UQYG5HXZwc1u7XJQvOg/w3zxKW |
| In-Reply-To | <1461265.Ovo60OvCif@PointedEars.de> |
| Cancel-Lock | sha1:uoFPdCw7WwmFW0bkXKBKgDdNK/U= |
| X-NNTP-Posting-Host | eJwFwYkRwDAMArCZcgSIx/FT7z9CJUJH7SvqcrlzCl/BgzDVzLpBrwW/DiDUSCNyPM+eHxdyEMo= |
| Xref | csiph.com comp.lang.javascript:28423 |
Show key headers only | View raw
Thomas 'PointedEars' Lahn schrieb:
> Christoph M. Becker wrote:
>
>> Alternatively, you can retrieve all select elements with
>> Element.getElementsByTagName("select").
>
> You are writing interface names as if they would refer to objects. This is
> confusing, and wrong if taken verbatim, because in recent DOM
> implementations those names can and do refer to objects, but not to objects
> that implement the interface, but objects that provide access to its
> features via the prototype chain. Unfortunately, this mistake of
> oversimplification is perpetuated by references such as MDN.
Yes, you're right. I have considered to write
Element.prototype.getElementsByTagName() instead, but that may not be
correct either – with host objects "you never know".
> [I am writing Element::getElementsByTagName(…) when I am referring to the
> abstract method of the interface, and element.getElementsByTagName(…) when I
> am referring to the implemented method of the element object referred to by
> “element” instead.]
That seems to be reasonable, and I tend to follow this convention
prospectively, even though it seems to be rather uncommon for ECMAScript
and as such potentially confusing for readers.
--
Christoph M. Becker
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Retrieve a select from a table cell "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-14 14:24 +0200
Re: Retrieve a select from a table cell "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-07-14 14:45 +0200
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-14 16:54 +0200
Re: Retrieve a select from a table cell "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-07-14 23:20 +0200
Re: Retrieve a select from a table cell "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-15 09:11 +0200
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-14 21:36 +0200
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-14 21:41 +0200
Re: Retrieve a select from a table cell "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-15 09:10 +0200
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-15 09:46 +0200
Re: Retrieve a select from a table cell "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-15 10:03 +0200
Re: Retrieve a select from a table cell "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-07-15 06:33 -0700
Re: Retrieve a select from a table cell "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-15 10:17 +0200
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-15 11:47 +0200
Re: Retrieve a select from a table cell "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-15 13:11 +0200
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-18 18:04 +0200
Re: Retrieve a select from a table cell Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-07-14 16:44 -0300
Re: Retrieve a select from a table cell Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-07-14 17:03 -0300
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-14 22:07 +0200
Re: Retrieve a select from a table cell Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-07-14 17:28 -0300
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-15 00:23 +0200
Re: Retrieve a select from a table cell Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-14 22:02 +0200
csiph-web