--- title: cabrillo.modal - Client description: Cabrillo JS functions for presenting web content inside of native modals.Use to dismiss a modal that has been presented with the presentModal\(\) function.Presents content in a native modal interface. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/cllent-mobile-api-reference/cabrillo-modal-namespace.html release: australia product: Cllent Mobile API Reference classification: cllent-mobile-api-reference topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 2 breadcrumb: [Client mobile API reference, API reference, API implementation and reference] --- # cabrillo.modal - Client Cabrillo JS functions for presenting web content inside of native modals. **Parent Topic:**[Client mobile API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/cllent-mobile-api-reference/api-client-mobile.md) ## cabrillo.modal - dismissModal\(Object data\) Use to dismiss a modal that has been presented with the presentModal\(\) function. A presented modal is responsible for dismissing itself and passing any results back to the presenting context. The dismissModal\(\) function must be called from the presented context not from the presenting context. |Name|Type|Description| |----|----|-----------| |data|Object|Optional. An object to pass back to the presenting context when the presented context dismisses itself.| |Type|Description| |----|-----------| |promise|If successful, an unresolved object, otherwise an error.| ``` // Any object can be passed back to the presenting context when the presented context dismisses itself. var results = { team: 'Mobile' company: 'ServiceNow' } cabrillo.modal.dismissModal(results).then(function() { console.log('Modal was dismissed and results were passed to presenting context.'); }, function(error) { console.log(error); }); ``` ## cabrillo.modal - presentModal\( String title, String url, String closeButtonStyle, String modalPresentationStyle\) Presents content in a native modal interface.
| Name | Type | Description |
|---|---|---|
| title | String | Title of the modal interface. |
| url | String | The URL to open the modal. This must be an internal instance URL \(fully qualified or relative; a relative URL is preferred\). |
| closeButtonStyle | String | Close button style of the modal interface. Possible values: - cabrillo.modal.CLOSE\_BUTTON\_STYLE\_CANCEL - cabrillo.modal.CLOSE\_BUTTON\_STYLE\_CLOSE - cabrillo.modal.CLOSE\_BUTTON\_STYLE\_DONE For more information, see [Cabrillo JS constants - close button styles](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/cllent-mobile-api-reference/cabrillo-constants.md). |
| modalPresentationStyle | String | Presentation style of the modal interface. Possible values: - cabrillo.modal.MODAL\_PRESENTATION\_STYLE\_FULL\_SCREEN - cabrillo.modal.MODAL\_PRESENTATION\_STYLE\_FORM\_SHEET For more information, see [Cabrillo JS constants - modal presentation styles](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/cllent-mobile-api-reference/cabrillo-constants.md). **Note:** This parameter is only supported on Apple iOS. |