features.registerOnSupportChange

API reference for the features.registerOnSupportChange method.
This version of the API is a preview. Preview APIs are unstable and may change without warning. You can't release public apps using this API until it's stable.

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 listener
await supportDisposer();
TYPESCRIPT

Parameters

onSupportChangefunction
Required

The callback that runs when the support status of an SDK method changes.

Returns

void

Returns

Disposes an event listener.

() => void