Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: DOM styling modified by JavaScript does not affect first rendering Date: Sat, 01 Nov 2014 16:50:52 +0100 Organization: solani.org Lines: 34 Message-ID: References: <0Qpl$Ta+fVUUFw8H@invalid.uk.co.demon.merlyn.invalid> <1487860.gEOcuQC4dx@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1414857038 574 eJwFwQERADEIAzBLX6D0JmfA8C/hE3oiW5HM4HJxX/FUt9pP2yfVRXHP5WC1bXI8rcHHAvMDMTwRhg== (1 Nov 2014 15:50:38 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 1 Nov 2014 15:50:38 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 X-User-ID: eJwFwQkBwDAIA0BLhTRQ5PAM/xJ2R5hY+zXa5XKP8EUrqAh8gU6VCjk+hoGOW7a7b7Ck9uUP+/cQdw== In-Reply-To: <1487860.gEOcuQC4dx@PointedEars.de> Cancel-Lock: sha1:i7czuJIt9VNSwj7F2E0vMMC30Fg= X-NNTP-Posting-Host: eJwFwYEBwCAIA7CbpC3Tc8CV/08wEXLl/ZhKajQ7ZJQh/XObY06YLsLJXB2IU/vctgCrHitzEZM= Xref: csiph.com comp.lang.javascript:26074 Thomas 'PointedEars' Lahn wrote: > Christoph M. Becker wrote: > >> Evertjan. wrote: >>> >> onload='document.body.style.display="block"'> >>> >>> works fine here, however: >>> >>> >> onload='this.style.display="block"'> >>> >>> cannot be used, why is that? >>> >>> cann't we use "this" in a onload? >> >> In this case /this/ is bound to the window object, > > Probably yes. > >> because the onload attribute of the body elements maps to the load event >> of the window object. > > No. Well, I better reformulate: The body element exposes the onload event handler of the Window object as event handler content attribute with the name onload. -- Christoph M. Becker