OmniJS is a completely different embedding of a JSContext, and doesn’t expose JXA’s Automation object at all.
You won’t be able to evaluate Standard Additions code in the omniJS interpreter, but you can evaluate omniJS source code from JXA, using the OO.evaluate(strSource) method, and get a return value back to JXA, so its possible to write scripts in which JXA and omniJS cooperate.
PS a useful way of shining a torch around a new or unfamiliar JS interpreter, and seeing what interfaces are available in its global namespace, is to evaluate the following snippet:
The landscape will look very different in each of the following, for example:
I would love an example showing how to evaluate OmniJS from JXA with a return value. (I know how to execute OmniJS source from JXA via a URL, but that doesn’t provide a return value.)
I see what you are saying, and I realize how naïve my post was, but I can’t quite put the pieces together. In particular, what (where) is OO.evaluate? A very simple example for which I would want to get the result back to JXA would be:
That method can return a string value.