cabrillo.modal - Client
-
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- API reference
Cabrillo JS functions for presenting web content inside of native modals.
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. |
Example
cabrillo.modal - presentModal( String title, String url, String closeButtonStyle, String modalPresentationStyle)
Presents content in a native modal interface.
Type | Description |
---|---|
promise | If successful, a Cabrillo.ModalResponse object, otherwise an error. |
Example
Present a native modal that loads a custom URL. This presents a custom Service Portal page in a form sheet style modal. The promise is fulfilled when the modal is dismissed. See the dismissModal() function for custom dismissal capabilities.