Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13393
| Message-ID | <2471669.zbv632muqx@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2012-04-15 11:44 +0200 |
| Subject | Re: Javascript Tutorial - Leave a comment regarding this online tutorial |
| Newsgroups | comp.lang.javascript |
| References | <21708501.852.1334458849164.JavaMail.geo-discussion-forums@pbig5> <1399409.AFRqVoOGUt@PointedEars.de> <308857a4-9740-446e-8c7d-511d2034c540@k10g2000pbk.googlegroups.com> |
| Followup-To | comp.lang.javascript |
Followups directed to: comp.lang.javascript
Javascript replace wrote: ^^^^^^^^^^^^^^^^^^ Who? > Thomas 'PointedEars' Lahn wrote: >> […] >> 4. Use window.alert(…) instead of alert(…), to make explicit that you >> intend to call a method of the object referred to by the `window' >> property of the global object, which does _not_ belong to any programming >> language (anymore; but to the AOM/DOM API instead). The same applies to >> window.prompt(…). >> […] > > Thanks, here are my answers Please learn to quote (to *post*, really). Full-quoting the entire text (including the signature) and adding your answers all below that is not appropriate. You have been referred to the FAQ of this newsgroup already. Further disregard of this most basic rule of posting will result in your postings being ignored by me. Free time and other resources are too precious to be wasted like this. > […] > For comment number 4) : Really does not matter whether is > window.alert() or just alert(), you see we call 'document' directly > instead of window.document but will take a second look at it. Wrong on all accounts. First, it does matter that you use `window' because when you do that you are not relying on the global object having been augmented by the host environment with an `alert' property (only a `window' property), or on the host environment providing the necessary scope chain (in event-handler attribute values). Keep in mind that host environments differ from one another as the ECMAScript implementations they support differ from one another. Second, the object referred to by the `document' property is not involved here. That argument may in itself be valid (tests are pending), but in this context it is a fallacy. Third, you are _not_ calling anything then; `document' is a property access (implicitly, by identifier resolution along the scope chain), not a (function) call. Mind your terminology unless you want to be written off as a hopeless script-kiddie. PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Javascript Tutorial - Leave a comment regarding this online tutorial Javascript replace <arie3456@gmail.com> - 2012-04-14 20:00 -0700
Re: Javascript Tutorial - Leave a comment regarding this online tutorial Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-15 10:19 +0200
Re: Javascript Tutorial - Leave a comment regarding this online tutorial Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-15 10:36 +0200
Re: Javascript Tutorial - Leave a comment regarding this online tutorial Javascript replace <arie3456@gmail.com> - 2012-04-15 02:11 -0700
Re: Javascript Tutorial - Leave a comment regarding this online tutorial Javascript replace <arie3456@gmail.com> - 2012-04-15 02:27 -0700
Re: Javascript Tutorial - Leave a comment regarding this online tutorial Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-15 11:44 +0200
Re: Javascript Tutorial - Leave a comment regarding this online tutorial Dr J R Stockton <reply1216@merlyn.demon.co.uk.not.invalid> - 2012-04-16 20:10 +0100
Re: Javascript Tutorial - Leave a comment regarding this online tutorial "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-15 15:39 +0000
csiph-web