[xhr] "Synchronous XMLHttpRequest outside of workers i..." (#59)

https://xhr.spec.whatwg.org/#sync-warning

> Synchronous XMLHttpRequest outside of workers is in the process of being removed from the web platform as it has detrimental effects to the end user's experience\. \(This is a long process that takes many years\.\) Developers must not pass false for the async argument when entry settings object's global object is a Window object\. User agents are strongly encouraged to warn about such usage in developer tools and may experiment with throwing an InvalidAccessError exception when it occurs\. 

This statement/deprecation is related to the way browsers do handle the (a)sync behavior.
Whether it has (or not) any "detrimental effects to the end user's experience" is subjective and should not be a valid argument.

Synchronous means it should not proceed to the next javascript statement until the request is complete, none said that browsers should freeze the UI by launching the request in the main thread...

Think about the "alert()" or "confirm()" in javascript. Those are synchronous because they block the execution of the script but it does not have "freeze" effects and does not have such "detrimental effects to the end user's experience" (subjective again).

So the specification should not be backing off the synchronous capability because browsers do implement it the wrong way. 

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/issues/59

Received on Friday, 11 March 2016 15:42:56 UTC