fabi1cazenave / webL10n

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

Hideous synchronous request #48

Closed KTachyon closed 9 years ago

KTachyon commented 10 years ago

Hi,

I have been using PDF.js' viewer to display PDF files and I found out it was using this library. I have an issue with the synchronous request. I believe that nothing should ever block the Javascript thread, no matter what, and using a synchronous XHR request is a really bad idea.

I'm currently working on a local server that shares the same thread with Javascript, so the synchronous request ended up causing a deadlock. So, in order to fix my issue, I have forked the project and fixed it for my scenario. I believe it should work for requesting multiple .properties files, but I have not tested it, since I'm on a very tight schedule, so I'm not creating a pull request at the moment. If anyone is interested in fixing this, you can find my solution to this problem at https://github.com/KTachyon/webL10n

Rob--W commented 9 years ago

Fixed.