safari – Capabilities of JavaScript in iOS Shortcuts


In line with this:

https://assist.apple.com/en-eg/information/shortcuts/apd218e2187d/ios

And this:

https://developer.apple.com/documentation/javascriptcore

And this:

https://medium.com/@chrishutchinson/hacking-around-with-javascript-and-shortcuts-in-ios-12-95f8d7190777

It looks like the JavaScript allowed in apple functions like Scriptable and Shortcuts is like, “pure” JavaScript (as a programming language), which one way or the other doesn’t assist importing any modules or packages.

The issue is I don’t know sufficient about how JavaScript works to understand this intuitively.

I’m fairly positive Apple’s JavaScriptCore is syntactically based mostly on ECMAScript 6 https://262.ecma-international.org/6.0/.

So far as I can inform, you can’t name fetch() in Scriptable, or in iOS Shortcuts’ “Run JavaScript on Webpage”.

It implies there are some JavaScript courses or strategies that aren’t accessible, however I don’t know how one can anticipate which of them.

How can I perceive exactly particularly what JavaScript instructions are supported and which aren’t, and why?

Am I purported to take WebKit as my documentation, maybe? https://developer.apple.com/documentation/webkitjs

https://webkit.org/weblog/7536/jsc-loves-es6/

But when I’m working JavaScript on a Safari web page from iOS Shortcuts, wouldn’t I’ve full entry to the client-side JavaScript capabilities of the browser, and doesn’t that naturally embody fundamental Internet APIs, like fetch()?

Leave a Reply

Your email address will not be published. Required fields are marked *