asynchronous functions

  • 1
  • Question
  • Updated 4 years ago
  • Answered
This is the code that is generated automatically for an inline snippet

var $ = skuid.$;
var myModel = skuid.model.getModel('MyModelId');
var myComponent = skuid.component.getById('MyComponentUniqueId');
// window.alert('hello');

I think this means that whatever is in the inner "function" call will be executing without blocking the page. Is that right ? That's what I want to happen, as I want to do an update on some of the page models without making the user wait til the update is finished.

Photo of ktyler


  • 9,274 Points 5k badge 2x thumb

Posted 4 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 43,156 Points 20k badge 2x thumb
This will not block the user unless you add code to do so.

Question then becomes, what are you going to be doing in the function? Calls to the server will likely cause a delayed UI reaction and could cause an adverse user experience.