jjmerelo jjmerelo - 5 months ago 31
Javascript Question

Which JavaScript features are available in Google Apps scripts?

The manual literally says that "Apps Script is based in JS 1.6, plus a few features of 1.7 and 1.8" (emphasis mine). However, I haven't found a reference of which few are really there. ArrayBuffer, for instance, is not. Is there a reference somewhere or a hack like

that yields what's available?


The JavaScript that runs in a .gs code file, runs on Google's server. It's server side code. There is no window object for a .gs code file. One useful service for storing data is the Cache Service

Google Documentation Link - Cache Service

You just need to search the Google Apps Script documentation for Classes, Methods and Properties that are available. There is auto-complete in the code editor, which should give you an idea of what's available to Apps Script Classes. There are classes in Apps Script that are specific to Apps Script, like: UI service or the HTML service, and the Content service.

If you are looking for what is available to client side JavaScript in the browser, that's different. You can use client side JavaScript and jQuery with HTML Service.