IBM Worklight v5.0.5 > API reference > IBM Worklight client-side API > JavaScript client-side API

WL.Client.getEnvironment

Identify the type of environment in which the application is running, such as iPhone, Facebook, Windows, or iGoogle.


Return Value

A constant that identifies the type of environment. Values are defined in the WL.Environment variable in the worklight.js file...

When an app is running in Preview mode, this method returns WL.Environment.PREVIEW, regardless of the previewed environment...

A good practice is to rely on the IBM Worklight UI optimization framework and separate environment-dependent JS to separate files rather than using the WL.Client.getEnvironment() function.


Parent JavaScript client-side API





+

Search Tips   |   Advanced Search