On September 25th, 2024, we released v2 of the Apps SDK. To learn what’s new and how to upgrade, see Migration FAQ and Migration guide.

appProcess

API reference for the appProcess namespace.
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.

A namespace that organizes methods and properties related to app processes.

Usage

import { appProcess } from "@canva/platform";
TSX

Properties

broadcastMessagefunction
REQUIRED

Sends a message to all active app processes.

To learn more, see appProcess.broadcastMessage.

currentobject
REQUIRED

Represents the current app process.

To learn more, see appProcess.current.

registerOnMessagefunction
REQUIRED

Registers a callback that runs when an app process receives a message.

To learn more, see appProcess.registerOnMessage.

registerOnStateChangefunction
REQUIRED

Registers a callback that runs when the state of an app process changes.

To learn more, see appProcess.registerOnStateChange.

requestClosefunction
REQUIRED

Requests the termination of an app process.

To learn more, see appProcess.requestClose.