JS this.app.invokeService sync

Hi everybody,

I have a problem using polymer client in cuba, I need to use the service invokeService from appCuba but I need this service sync, I mean “async: false”,

var params = {nif:nif, email:email};
this.app.invokeService("bo_GestionService", "isValid", params)
                         .then(response => {
                                console.log("#### response = " + response);
                                respuesta = response;
                      }).catch(reason => console.log("Error en lanzarServicio : " + reason));

is there any way to make this call sync instead of asynchronous???

Thank a lot!!!

Unfortunately, synchronous XHR is deprecated: Synchronous and asynchronous requests - Web APIs | MDN

Starting with Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27), Blink 39.0, and Edge 13, synchronous requests on the main thread have been deprecated due to the negative effects to the user experience.

That’s why we are not planning to support synchronous APIs in CUBA JS bindings.

Hi Yuriy, thank a lot!!