You’re viewing outdated documentation. View the latest Customer’s Canvas On-Premises documentation.

getContainer Method

Applies to: Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · Archived documentation

Callable

  • Gets a container by its name.

    example
    // Load the editor.
    CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition)
        // If the editor has been successfully loaded.
        .then(function (editor) {
            // When we get the product.
            editor.getProduct().then(function (product) {
                // Display a container with the "foil" name.
                console.log(product.currentSurface.printAreas[0].getContainer("foil"));
            });
        });

    Parameters

    • name: string

      A name of the container.

    Returns Container