JavaScript version?

It certainly seems to support ES 6 with the things I’ve tried using but looking at the inbuilt docs, the licensing in the beta, and the release notes in TestFlight, I don’t see any specifics.

In terms of the specifics of Scriptable, from the app description:

"A new approach to automation. Automate tasks using JavaScript with bridges to the native APIs such as the file system, alerts, pasteboard, image picker and much more.

- Native APIs bridged ti JavaScript with comprehensive documentation"

As a brand new application which integrates with the iOS system rather than with a web browser thee are fundamental differences in the aim and the approach. This ia also why the app specific documentation is within the app.

If you learn about ES 6 and look at the in app documentation, you should have everything you require for now; but if you learn just ‘some’ JavaScript, regardless of version, and read the documentation in the app you will be able to do things and then as you want to do more just keep expanding your reading and understanding.

The chances are that when the public release occurs there will be more information available about it, and I expect what base version engine of JavaScript has been integrated will be covered. My best guess would be it is using the inbuilt iOS JavaScriptCore and so support might be tied to Apple’s development of that.

In terms of accessing JavaScript libraries that enable you to access web APIs, take a look at this thread - Import one script from another? - Scriptable. It gives an example for accessing a local file and evaluating the content so that the executing script can use it. Many web sites would take copies and store them locally for performance reasons, so I’d give some consideration to that approach.

However, you could extrapolate the same approach to pull in the library content from a remote source rather than a local source and then evaluate it once the content has been retrieved,

Hope that helps.

1 Like