cabrillo - Client
- UpdatedAug 1, 2024
- 1 minute read
- Xanadu
- API reference
Cabrillo JS is a client side JavaScript API for accessing capabilities inside ServiceNow native mobile applications.
Use Cabrillo JS to build a custom mobile experience in ServiceNow native mobile applications. Cabrillo JS provides APIs to use native device capabilities, native mobile UI, and other ServiceNow mobile functionality.
Cabrillo JS is
available in AngularJS as an injectable parameter. For example, you can inject Cabrillo JS in a Service Portal widget client
script.
function(cabrillo) {
var c = this;
// Used to determine if Cabrillo is executing in ServiceNow's native mobile apps.
c.isNative = cabrillo.isNative();
}Cabrillo JS APIs are only supported when executing in ServiceNow native mobile applications. Use the cabrillo.isNative() API to determine if the script is executing in a native context.
Note: Cabrillo JS APIs
are unavailable in GlideForm client scripts.
cabrillo - isNative()
Boolean value indicating if Cabrillo JS is executing a ServiceNow native mobile application.
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| Boolean | Returns true if Cabrillo JS is running in a native context; otherwise, false. |
Example
var isNative = cabrillo.isNative();