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

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

From: Lee Kowalkowski <lee.kowalkowski@googlemail.com>
Date: Mon, 29 Apr 2013 12:12:39 +0100
Message-ID: <CAGpS7GMsTgR3Lg8T1i6Uqd_ohHRhJeOs28uVNgbTV+vhzY+hYQ@mail.gmail.com>
To: WHATWG <whatwg@whatwg.org>
On 24 April 2013 12:51, Robert O'Callahan <robert@ocallahan.org> wrote:
> Context: https://bugzilla.mozilla.org/show_bug.cgi?id=863499
> Proposal:
> Give Web applications APIs to explicitly delay the document load event. In
> particular, add a method "document.delayLoadEvent()" that causes the
> document load event to be delayed until a corresponding
> "document.stopDelayingLoadEvent()" method is called. Allow these to nest so
> that the document load event is delayed until at least as many calls to
> stopDelayingLoadEvent() have been made as there were calls to
> delayLoadEvent().

Is it only me that finds this potentially recursive?  If the load
event is too early to capture a thumbnail because there might be other
tasks waiting for the load event before they contribute to the initial
page rendering, then how does delaying the load event help?

I think if a page continues its initial rendering after the load event
has been fired, then that's the issue, why was the page created that
way in the first place?  All of my Chrome thumbnails under 'Most
Visited' look fine.

Also, do these thumbnail capture activities definitely work on the
onload event?  Can't they be more intelligent? (e.g. wait for
DOM/network inactivity or a maximum of 30 seconds).

If the page author really wanted control over this, why do they need
something complicated like .delayLoadEvent() and
.stopDelayingLoadEvent() and not just .captureThumbnail(), or
something to put into a <meta> element more suited to the purpose of
capturing/providing thumbnail images.

Received on Monday, 29 April 2013 11:13:21 UTC

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