W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2012

Re: [whatwg] Sychronous operations in onclose handlers

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 22 Aug 2012 09:42:35 -0700
Message-ID: <CAAWBYDAYuHdZCk7BbJ8EtRbKOTk9J44uQyq817g12wVQ8a4Kjw@mail.gmail.com>
To: Mark Watson <watsonm@netflix.com>
Cc: whatwg Group <whatwg@lists.whatwg.org>
On Wed, Aug 22, 2012 at 8:50 AM, Mark Watson <watsonm@netflix.com> wrote:
> Hi everyone,
>
> I heard that there was some discussion of banning the use of synchronous operations within document onclose handlers.
>
> Whilst it is obviously bad to hold up the closing of a document - especially indefinitely - I wondered what the solution was for applications that need to perform some final communication with an application server - say using XHR - when the document is closed ? Is it possible that events could continue to be handled for some short time after the onclose completes ? Something else ?
>
> I understand that there are cases where this is not possible - such as sudden loss of power - but that does't mean it isn't useful to be able to perform such operations in the normal, common, case.

I worked through a proposal for this exact problem a few months ago:
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/035686.html>

Hixie hasn't burned through enough of his backlog to work on it yet,
but if you have further comments, perhaps you could add them to that
thread.

~TJ
Received on Wednesday, 22 August 2012 16:43:25 UTC

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