For a variety of reasons, I need programatic JavaScript access the the hostname or IP address of the Worklight server from the client code.
For example: - I want to pull scripts and resources from the same host as the Worklight server - I have an out-of-band service on the Worklight host and I want to connect to it
@IdanAdar has said that the address does not exist. I've search the WL object and cannot find it either. See Can we get the app version and IP address info using worklight api?.
Note that document.location.hostname is null when running as a native app.