W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2014

Re: =[xhr]

From: David Rajchenbach-Teller <dteller@mozilla.com>
Date: Wed, 03 Sep 2014 15:07:19 +0200
Message-ID: <54071287.3080701@mozilla.com>
To: public-webapps@w3.org
Q1) No, there is no immediate alternative at the moment, nor is there
one planned. One of the reasons for this proposed change to the
semantics of XHR is to stop hiding asynchronous behavior behind a
synchronous implementation that cannot be quite implemented in a
satisfactory manner.

Q2) The general recommendation is to either move code off the main
thread (e.g. to a worker) or to rewrite it asynchronously (possibly
using Promise and Task.js to maintain a readable syntax and exception

This is quite some work, but my personal experience shows that it also
makes the code much more flexible/optimizable for responsiveness in many
ways. In this case, I believe that it would require changes to Java2Script.


On 12/07/14 17:57, Robert Hanson wrote:
> Q1) I don't see how that could possibly be done asynchronously. This
> could easily be called from a stack that is 50 levels deep. Am I missing
> something here? How would one restart an entire JavaScript stack
> asynchronously?
> Q2) Is there an alternative to "the main thread" involving AJAX still
> using synchronous transfer?
> Bob Hanson
> Principal Developer, Jmol/JSmol
> -- 
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
> If nature does not answer first what we want,
> it is better to take what answer we get.
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

Received on Wednesday, 3 September 2014 13:07:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:26 UTC