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
infoobjectRequired
The information about the current process.
info.surfacestringRequired
The location in Canva where the process is running.
The possible values are:
- "object_panel"
- "selected_image_overlay"
info.processIdstringRequired
The unique ID of the process.
info.launchParamsobjectOptional
Arbitrary parameters passed from the app to the process when the process launches.