[whatwg] setting .src of a SCRIPT element

Hallvord R M Steen hallvors at gmail.com
Mon May 21 10:26:07 PDT 2007

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

Hallvord R. M. Steen

More information about the whatwg mailing list