W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2013

Re: [whatwg] API to delay the document load event

From: David Bruant <bruant.d@gmail.com>
Date: Sun, 28 Apr 2013 20:00:12 +0200
Message-ID: <517D63AC.1070104@gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: WHATWG <whatwg@whatwg.org>, Robert O'Callahan <robert@ocallahan.org>
Le 28/04/2013 19:47, Glenn Maynard a écrit :
> On Sun, Apr 28, 2013 at 12:28 PM, David Bruant <bruant.d@gmail.com 
> <mailto:bruant.d@gmail.com>> wrote:
>     Also, I don't see how nested calls to delayLoadEvent help any of
>     your 2 use cases.
> Because multiple pieces of code on the page may need to do this 
> independently.  For example, you may have widgets on the page that 
> need to send a request to a server to figure out what to display.  The 
> approach I suggested handles this, and could easily fire an event on 
> the document automatically.
Each widget needs some way to express that it's ready, but doesn't 
necessarily need to express it to the document directly. A "widget 
manager" can load the widgets, gather all widgets "ready" events and 
trigger the UA "AppReady" event when the widgets are ready.

I don't think we should be promoted patterns where widget are fully 
independent which is pretty much the equivalent of a script injection 
(where anything can happen, like one forgetting to call its 
I believe one event to trigger will be hard enough in complex 
applications, let's not allow more opportunities to mess it up by 
distributing to independent actors the authority to trigger one event to 
the UA.

Received on Sunday, 28 April 2013 18:00:42 UTC

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