getContainer Method

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