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

infoobject
Required

The information about the current process.

info.surfacestring
Required

The location in Canva where the process is running.

The possible values are:

  • "object_panel"
  • "selected_image_overlay"
info.processIdstring
Required

The unique ID of the process.

info.launchParamsobject
Optional

Arbitrary parameters passed from the app to the process when the process launches.