Google Apps Script - Web App - Console Status Update Text Messages

I have a working Google Apps script that displays a single web app output at the end.

The script lasts about ~20 seconds, and I'm looking to improve the user experience, by intermittently update the script status during this period.

I understand the challenges of asynchronous server/client operation, but I'm surprised that such "trivial" functionaly seems quite hard to realize.

I reviewed similar topics, but miss a good example.

Code Example :

function doGet(e){
  output = function1();
  output = function2();
  return HtmlService.createHtmlOutput(output).
}

function function1() {
 //DoSomething
 return = "output1";
}

function function2() {
 //DoSomething
 return = "output2";
}

I'm not looking to replace the function calls by HTML calls. But maybe continously poll a global variable until script execution is completed, if this is feasible?

Any example code will be highly appreciated.

Best Regards, Kristof



from Recent Questions - Stack Overflow https://ift.tt/3xBYfP9
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations