JsgiServlet uses RhinoEngine.invoke(moduleid, functionname, args...)
to load a module and invoke an exported function. RingoShell just
compiles the input and executes it on a scope it got from the engine,
but the printResult() and printError() methods in RingoShell git
master also uses invoke to render the result.
I hope this helps you get started, let me know if you need more help.
Hannes
2011/5/13 Darren Cruse <darren...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "RingoJS" group.
> To post to this group, send email to rin...@googlegroups.com.
> To unsubscribe from this group, send email to ringojs+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ringojs?hl=en.
>
>
Yes, implementations should be by and large compatible.
> b. Is it likely for Ringo to switch over to the built-in Rhino
> CommonJS support in the future?
Not in the near future, as Ringo's module loader has a few features
the one in Rhino lacks (and vice versa).
> c. Is either Ringo or Rhino's CommonJS support usable via the JSR223
> scripting api?
I'm not sure, but I'd guess no. Unfortunately we blew the deadline to
get Rhino 1.7R3 ready in time to be included in JDK 7 which is now
close to release. Even if it was, CommonJS module support has to be
activated by the embedding code or the Rhino shell, and I'm not sure
this is possible with JSR223 (except maybe from JS code).
Hannes
> Thanks again (hope somebody knows/responds - have a deadline dependent
> on the answers :),
>
> Darren
>