sleemanj / xinha

WYSIWYG HTML Editor Component (turns <textarea> into HTML editors)
http://trac.xinha.org/
Other
13 stars 2 forks source link

Try to get rid of synchronous XMLHTTPRequest (Trac #1730) #1730

Open sleemanj opened 5 years ago

sleemanj commented 5 years ago

Synchronous XMLHTTPRequests should be avoided where possible, even if that means just faking a synchronous perhaps by spin-waiting until it's complete, just in case Chrome actually removes sycnhronous requests. Main candidate is _geturlcontent() in XinhaCore, used by Skin, Language and Icon loading.

http://trac.xinha.org/ticket/1729

A synchronous XMLHttpRequest request on the main thread is deprecated due to the negative effects on the user experience. For more information see ​http://xhr.spec.whatwg.org/ XinhaCore?.js: 8248:2

Reported by @sleemanj, migrated from http://trac.xinha.org/ticket/1730

sleemanj commented 5 years ago

guest commented:

Replying to [ticket:1730 gogo]:

Synchronous XMLHTTPRequests should be avoided where possible, even if that means just faking a synchronous perhaps by spin-waiting until it's complete, just in case Chrome actually removes sycnhronous requests. Main candidate is _geturlcontent() in XinhaCore, used by Skin, Language and Icon loading.

I apologize... I understand the concept but I'm not so good at putting it into practice. Could you give me an example to have a work track?