appProcess.current.requestClose

API reference for the appProcess.current.requestClose method.

Requests the termination of the current process.

import { appProcess } from "@canva/preview/platform";
// When the user completes a workflow
appProcess.current.requestClose({ reason: "completed" });
// When the user aborts a workflow
appProcess.current.requestClose({ reason: "aborted" });
tsx
#optionsobject
Required

The options for closing the current process.

#options.reasonstring
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.

void