[whatwg] script postonload

On Wed, Feb 10, 2010 at 11:26 AM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> For example, all the behavior of DEFER and ASYNC can be replicated using
>> JavaScript
>
> That's not the case, actually. ?The behavior of DEFER (eager load start,
> deferred script execution, not blocking the parser or other scripts while
> loading) cannot in fact be replicated using JavaScript in a cross-browser
> manner. ?The behavior of ASYNC (and in particular its allowing scripts to
> run in order other than DOM insertion order, combined with the eager loading
> it triggers, not blocking other scripts, and execution when the load is
> done) can't be replicated cross-browser either, unless I'm missing
> something.

ASYNC can be implemented in most browsers actually. In browsers other
than firefox (and possibly opera), creating an element using the DOM
and inserting it into a document gives the same behavior as ASYNC
scripts.

I'm planning on fixing this in firefox for 3.7.

/ Jonas

Received on Wednesday, 10 February 2010 11:44:02 UTC