[whatwg] Proposal for separating script downloads and execution
jonas at sicking.cc
Thu Feb 3 17:15:43 PST 2011
On Thu, Feb 3, 2011 at 4:53 PM, Nicholas Zakas <nzakas at yahoo-inc.com> wrote:
> I don't think readyState as Kyle describes is an appropriate candidate mechanism because it's not an actual indicator that the functionality exists. The only thing you can really be sure of if readyState is "uninitialized" is that the script element supports readyState. The fact the only browser supporting this presently is the same one that supports the desired behavior is a happy coincidence. There's nothing about the presence of readyState in general or the particular value that gives any explicit indication that adding the script node will result in a particular download/execute behavior. You may as well test another well-known IE property like (typeof ActiveXObject == "object").
> The thing I like about my proposal (with of course, the obvious bias that it is my proposal), is that it's easy and unconfusing to determine if the browser supports delayed execution by testing for the presence of script.execute.
> Even if my solution isn't the best one, I do believe the best one needs to follow this model of explicit feature detection.
I agree. I don't think that the readyState mechanism is particularly
simpler. Another nice thing about the noexecute design is that it is
purely opt-in, which means that you don't risk poor on already
More information about the whatwg