API reference
Design
addAudioTrackaddElementAtCursoraddElementAtPointaddNativeElementaddPagecreateRichtextRangeeditContentgetCurrentPageContextgetDefaultPageDimensionsgetDesignTokeninitAppElementopenDesignoverlay.registerOnCanOpenrequestExportselection.registerOnChangesetCurrentPageBackgroundui.startDragToCursorui.startDragToPointui.startDrag
Intents: data
Intents: design
Platform
appProcessappProcess.broadcastMessageappProcess.currentappProcess.current.getInfoappProcess.current.requestCloseappProcess.current.setOnDisposeappProcess.requestCloseappProcess.registerOnMessageappProcess.registerOnStateChangefeatures.isSupportedfeatures.registerOnSupportChangegetPlatformInfonotification.addToastrequestOpenExternalUrl
features.registerOnSupportChange
API reference for the features.registerOnSupportChange method.
Registers a callback that runs when the context changes and an SDK method becomes supported or unsupported.
Usage: Monitoring feature support changes
import { features } from '@canva/platform';import { addElementAtPoint } from '@canva/design';const supportDisposer = features.registerOnSupportChange(() => {const isNowSupported = features.isSupported(addElementAtPoint);// Update UI based on new support status});// Later: cleanup the listenerawait supportDisposer();
TYPESCRIPT
Parameters
onSupportChange
function
Required
The callback that runs when the support status of an SDK method changes.
Returns
void
Returns
Disposes an event listener.
() => void