[ad_1]
Based on this:
https://help.apple.com/en-eg/information/shortcuts/apd218e2187d/ios
And this:
https://developer.apple.com/documentation/javascriptcore
And this:
It looks as if the JavaScript allowed in apple purposes like Scriptable and Shortcuts is like, “pure” JavaScript (as a programming language), which in some way doesn’t help importing any modules or packages.
The issue is I don’t know sufficient about how JavaScript works to know 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 not 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 find out how to anticipate which of them.
How can I perceive exactly particularly what JavaScript instructions are supported and which aren’t, and why?
Am I imagined 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 embrace fundamental Internet APIs, like fetch()?
[ad_2]