fabi1cazenave / webL10n

Client-side internationalization / localization library
http://fabi1cazenave.github.com/webL10n/
278 stars 70 forks source link

Use of deprecated synchronous request #53

Closed paulguz closed 9 years ago

paulguz commented 9 years ago

Alluded to already in #48, webl10n makes synchronous XMLHttp requests.

As warned in the Chrome console, and specified on https://xhr.spec.whatwg.org/

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 the JavaScript global environment is a document environment. 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 must be addressed going forward.

Rob--W commented 9 years ago

This issue is a duplicate of #48, which will be fixed once #52 has been merged.

@fabi1cazenave has given me push access to this repo, he said that if he does not review within 3 days, I'm allowed to merge the patch any way.

You are of course also free to review my PR, perhaps you can spot an issue that I overlooked ;)

paulguz commented 9 years ago

That's good news, thanks. I'll keep an eye out for the update.

fabi1cazenave commented 9 years ago

I’ve just merged #52, this is a nice improvement. Using synchronous requests was a quick-and-dirty way which was fine for our use case in Gaia, but I’m glad to get rid of them.

paulguz commented 9 years ago

Excellent, thanks.