Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder7.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Calling an include file by using JavaScript ? Date: Sun, 17 Nov 2019 21:48:38 +0000 Organization: A noiseless patient Spider Lines: 23 Message-ID: <87d0dqi37t.fsf@bsb.me.uk> References: <9bab4aea-6cd1-4c20-a953-8f02509189af@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="cb1030438be7e2389760816f64863991"; logging-data="17743"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UjEiZ8xwB1cvFIHqQWOtcxl18tgx6L6A=" Cancel-Lock: sha1:eG5bx5X+eKBynEt2/UST3GPQw7g= sha1:rwWlR6e8NChG6r40ra16u/6x1IE= X-BSB-Auth: 1.fceab3451ad7c19aac41.20191117214838GMT.87d0dqi37t.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:37807 dr.j.r.stockton@gmail.com writes: > I have many local pages with the following line in the HEAD > element : > > > I want to add some constant Javascript to each of those pages; > I could do it by putting next a line : > > > Can I get the same inclusion, with a little respectable > standards-compliant code, by putting a bit more script in C.js ; > and if so how? If you can rely on them being supported, ECMAScript modules are probably the way to go. The old hack was to write code that adds a