Deprecated ajax sync

edited July 2019 in Technical questions

I using sync() on ajax got an deprecated warning below
Chrome Version 75.0.3770.100 (Official Build) (64-bit)

var xhr = webix.ajax().sync().get('https://jsonplaceholder.typicode.com/posts/1'); 
ajax.js:90 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
O @ ajax.js:90
get @ ajax.js:174
(anonymous) @ VM459:1
undefined
---- withotu sync----
var xhr = webix.ajax().get('https://jsonplaceholder.typicode.com/posts/1'); 
undefined

I just report this, any other new syntax to use this sync https://docs.webix.com/api__ajax_sync.html
alternatively I use ajax promise

Thanks.

Tagged:

Comments

  • edited July 2019

    Hey @finzaiko, I would like to note that you are still free to use any other syntax from the webix.ajax API(https://docs.webix.com/api__refs__ajax.html) or alternatively, as you mentioned, you can use promises. At some point in the future when Synchronous XMLHttpRequest deprecation will be fully complete we will most likely remove this method from our library.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion