API reference
Design
Platform
appProcess.current.getInfo
API reference for the appProcess.current.getInfo 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.
Gets information about the current process.
Usage
import { appProcess } from "@canva/platform";const context = appProcess.current.getInfo();if (context.surface === "object_panel") {console.log("The process is running in the object panel");}
TSX
Returns
info
object
REQUIRED
The information about the current process.
info.surface
string
REQUIRED
The location in Canva where the process is running.
The possible values are:
"object_panel"
"selected_image_overlay"
info.processId
string
REQUIRED
The unique ID of the process.
info.launchParams
object
OPTIONAL
Arbitrary parameters passed from the app to the process when the process launches.