Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <7541101.Wcpfboz3pJ@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 11 Feb 2013 01:02:21 +0100 User-Agent: KNode/4.8.5 Content-Transfer-Encoding: 7Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. tag in IE Newsgroups: comp.lang.javascript References: <2542700.24A3Wqytjl@PointedEars.de> <8809769.VO6lmAGIsZ@PointedEars.de> <2710705.sg4g0aCLjx@PointedEars.de> <1522652.FLkxLQDhY3@PointedEars.de> <1573878.qxiknB9TEh@PointedEars.de> MIME-Version: 1.0 Lines: 65 NNTP-Posting-Date: 11 Feb 2013 01:02:22 CET NNTP-Posting-Host: c095950a.newsspool1.arcor-online.net X-Trace: DXC=oYa;Bn]7XIZaAeROF2PWMQic==]BZ:af^4Fo<]lROoRQnkgeX?EC@@P:HSIQ^WeSTRDZm8W4\YJN\b@mF9jNikdU3>YBYU3JEo]jk:^hYG2_^Q X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:18444 Cezary Tomczyk wrote: > W dniu 2013-02-11 00:09, Eric Bednarz pisze: >> Cezary Tomczyk writes: >> [event attributes versus DOM*] >>> Arguments, with which I agree: >>> >>> http://stackoverflow.com/a/11742769/896702 >> >> | if an event is specified inline, the JS is specified as a string >> | (attribute values are always strings) and evaluated when the event >> | fires. Evaluation is evil. >> >> Newsflash: event attribute value literals are *not* eval'ed. This BS >> theory just seems to keep coming back like a bad song whenever >> arguments, common sense and experience are exhausted. ACK. > I thought that the code is eval'ed :/ Apparently there are at least two people who think/thought that. AISB, utter nonsense being told is more the rule than the exception in this field. [But if I consider postings elsewhere, for example in de.sci.ALL, perhaps this is true of any field. It has always been easier to post nonsense than a sound argument. Insofar it appears to be prudent to limit one's rebuttal to the key points so as not to be overwhelmed by nonsense to be refuted. On the other hand, a short, to-the-point rebuttal invites even more nonsense. It is a difficult decision.] >> | you are faced with having to reference named functions. This is not >> | always ideal (event handlers normally take anonymous functions) >> >> The what? 'Normally', 'event handlers' are objects that implement the >> EventListener interface. The fantasy nomenclature for function >> declarations and expressions aside, function objects created by event >> handlers don't have an identifier, so they should be alright (eyeroll). > > Ok, this source provides more consistent information: > http://www.w3.org/html/wg/drafts/html/master/webappapis.html#event- handler-content-attributes That is an Editor's Draft. > "7. Set up the script's global object [...]" + "This is typically a > Window object. In JavaScript, this corresponds to the global object." > (http://www.w3.org/html/wg/drafts/html/master/webappapis.html#script%27s- global-object) You keep on quoting irrelevant sources. > If I understood it correctly the code inside event-handler attribute is > executed in global context, right? Wrong, because the scope chain of that code includes more than the global object: -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.