Adds the following features in order to make the QuickJS engine slightly
more compatible with the Rhino engine:
Makes “Packages” be an alias for “uno.idl”
Adds an implementation of importClass. This tries to get the name of the
thing that is being imported and then sets a global variable with that
name to point to that thing. The name is retrieved by adding a
getImportClassName method to most of the objects returned by
moduleGetOwnProperty.
Inserts a com.sun.star.uno.UnoRuntime object with a hack on
moduleGetOwnProperty. This object has a method called “queryInterface”
to allow doing UnoRuntime.queryInterface(interface,obj). The
implementation just calls
obj.queryInterface(uno.type.interface(interface))
This is enough to run the HelloWorld example from the Rhino JavaScript
provider.
Change-Id: I569fe4dad4cd8cdc6029a60f8e5421a5de1588c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204912
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>