Re: [whatwg] Sychronous operations in onclose handlers

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