W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2007

[whatwg] setting .src of a SCRIPT element

From: Hallvord R M Steen <hallvors@gmail.com>
Date: Mon, 21 May 2007 19:26:07 +0200
Message-ID: <dd4c8a40705211026sf96539dpb25968784ff104cd@mail.gmail.com>
Hi,
if you set the src property of a SCRIPT element in the DOM, IE will
load the new script and run it. Firefox doesn't seem to do anything
(perhaps a more seasoned bugzilla searcher can tell me if it is
considered a known bug?).

I think Opera 8 does what IE does, Opera 9 is buggy.

I think IE's behaviour is pretty useful and I'd like the spec to make
this standards-compliant. It is a common technique to create SCRIPT
elements dynamically to load data (particularly because this gets
around cross-domain limitations). Firefox's implementation means one
has to create a new SCRIPT element each time, keep track of them, and
remove them from the document again, whereas with IE's implementation
you can have one "data loader" SCRIPT element and set its .src
repeatedly.

-- 
Hallvord R. M. Steen
Received on Monday, 21 May 2007 10:26:07 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:55 UTC