Path: csiph.com!.POSTED.194-73-239-109.cust.centrio.cz!not-for-mail From: Cezary Tomczyk Newsgroups: comp.lang.javascript Subject: Re: Adding section into page Date: Tue, 24 Jan 2017 21:33:38 +0100 Organization: csiph.com Internet News Service Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 24 Jan 2017 20:33:40 +0000 (UTC) Injection-Info: csiph.com; posting-host="194-73-239-109.cust.centrio.cz:109.239.73.194"; logging-data="25011"; mail-complaints-to="admin@kev009.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: Xref: csiph.com comp.lang.javascript:32309 On 24/01/2017 03:54, Doc O'Leary wrote: > For your reference, records indicate that > Dr J R Stockton wrote: > >> ASIDE : can code executed from within a script element in the body of a >> page obtain a reference to the script element itself or to an >> adjacent element in the DOM tree, or similar? > > document.currentScript will get you the element of the currently > executing script. With some exceptions based on http://caniuse.com/#search=document.currentScript -- Cezary Tomczyk http://www.ctomczyk.pl/ https://www.aslint.org/ - Accessibility linting tool