Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Keep Synchronous XMLHttpRequest alive or improve it. #6451

Open
yonosteward opened this issue Feb 3, 2018 · 2 comments
Open

Comments

@yonosteward
Copy link

NWJS Version : N/A
Operating System : N/A

In the Web world, Synchronous XMLHttpRequest in the main thread often is considered as a bad thing and will trigger warning in the browsers. Even there are many people requesting to keep this feature. (By the way, I think Web API designers may also forbid "while" and "for" in the main thread since those could also freeze UI. :-) )

However, in the desktop application, the application don't have other browser tabs and sometimes the application will do a network request to a trusted local server. So a traditional code with synchronous XMLHttpRequest is very simple:

let data = aSimpleSynchronousXMLHttpRequest(....);

consume(data);

So I hope if NW.js can keep Synchronous XMLHttpRequest alive at least. And if possible, it would be super awesome to improve the old XMLHttpRequest API and make it can take synchronous with a timeout option, just like the popular C++ curl APIs.

You guys are C++ guru and hope you guys can make the Web world better.

@GnorTech
Copy link
Member

We'll try to continue supporting sync XHR in NW. Currently we removed the deprecation warning 2 years ago.

However, we have no plan to improve it with adding timeout support for now due to resource limitation and as it's being deprecated in upstream.

@GnorTech
Copy link
Member

Ref whatwg/xhr#20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants