Initializes the Design Interaction capability.
Under the hood, this function:
- Gets the
designInteraction
property from thewindow.canva
object - Throws an error if the
designInteraction
property is not available - Provides type-safety when using TypeScript
Usage
import { getDesignInteraction } from "@canva/design-interaction";const designInteraction = getDesignInteraction();console.log(designInteraction); // => DesignInteraction
Returns
Returns an object that exposes the following methods: