iink-ts - v4.0.0
    Preparing search index...

    Class Canvas

    const canvas = await Canvas.load(
    document.getElementById("canvas"),
    "INTERACTIVE_INK",
    { configuration: {...} }
    )
    Index
    • Gets a specific canvas instance by type

      Type Parameters

      Parameters

      • type: T

        The canvas type to retrieve

      Returns TCanvasVariantMap[T] | undefined

      The canvas instance of the specified type or undefined

    • Loads and initializes an canvas instance

      Type Parameters

      Parameters

      • rootElement: HTMLElement

        The HTML element to mount the canvas

      • type: T

        The canvas variant type to load

      • options: TCanvasOptionsMap[T]

        Configuration options specific to the canvas type

      Returns Promise<TCanvasVariantMap[T]>

      Promise resolving to the initialized canvas instance

      This method will destroy any previously loaded canvas instance before creating a new one. Use getInstance to access the currently active canvas.