Is google apps script synchronous?

后端 未结 3 708
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-06 10:08

I\'m a Java developer learning JavaScript and Google Apps Script simultaneously. Being the newbie I learned the syntax of JavaScript, not how it actually worked and I happil

3条回答
  •  爱一瞬间的悲伤
    2020-12-06 11:13

    While Google Apps Script implements a subset of ECMAScript 5, there's nothing forcing it to be asynchronous.

    While it is true that JavaScript's major power is its asynchronous nature, the Google developers appear to have given that up in favor of a simpler, more straightforward API.

    UrlFetchApp methods are synchronous. They return an HttpResponse object, and they do not take a callback. That, apparently, is an API decision.

提交回复
热议问题