API reference
Design
Platform
appProcess.current.requestClose
API reference for the appProcess.current.requestClose method.
This version of the API is deprecated. This version will soon be unsupported. You should use a stable version of the API in your app.
Requests the termination of the current process.
Usage
import { appProcess } from "@canva/platform";// When the user completes a workflowappProcess.current.requestClose({ reason: "completed" });// When the user aborts a workflowappProcess.current.requestClose({ reason: "aborted" });
TSX
Parameters
options
object
REQUIRED
The options for closing the current process.
options.reason
string
REQUIRED
The reason why the app is requesting the process to close.
The possible values are:
"completed"
- Indicates that a workflow is complete, and any unsaved changes should be saved."aborted"
- Indicates that a workflow has been aborted, and unsaved changes should be ignored.
Returns
void