W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Proposal for separating script downloads and execution

From: Glenn Maynard <glenn@zewt.org>
Date: Fri, 11 Feb 2011 16:30:35 -0500
Message-ID: <AANLkTi=BXkL3_ZR9kCMwE7A7V=7OecTpH_imrmBc+dnn@mail.gmail.com>
On Fri, Feb 11, 2011 at 12:57 PM, Will Alexander <
serverherder+whatwg at gmail.com> wrote:

> > Are there changes I can make to my proposal that would make it easier to
> implement and therefore more likely to have someone take a stab at
> implementing?
>
> I may have missed it, but what would execute() do if the url has not
> been loaded?   Would it be similar to a synchronous XHR request, lead
> to ASAP execution, or throw error?
>

In my proposal (which was intended as a further refinement of Nicholas's),
execute would only be permitted once the network load completes, and throw
an exception if called before then.

 > Is there a concrete alternate proposal that's worth building out instead?
>
> If execute() must be synchronous, then readystate is not applicable.
> Otherwise, while it should be considered, it would probably take
> longer to describe and has no corresponding markup semantics.
>

(I only suggested execute() being synchronous since it made sense in the
context of my proposal and it seemed like a useful, natural side-effect of
the rest of the proposal.)



> Glenn's point about noexecute  being a natural extension of defer and
> async is a good one, however neither of those required changing onload
> semantics or introducing a new event type.  Readystate on the other
> hand is already a well-known concept. Moreover, if history is any
> indication, we'll continue using it to implement deferred exec for
> awhile.
>

Note that I didn't mean to propose changing existing event semantics; I
simply forgot that script events already had an onload event that means
something entirely different than the one described by Progress Events.  The
"finished loading from the network" event would need to have a different
name.

-- 
Glenn Maynard
Received on Friday, 11 February 2011 13:30:35 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC