getContainers Method

Callable

  • Gets an array of all containers in the print area.

    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 obtained containers.
                console.log(product.currentSurface.printAreas[0].getContainers());
            });
        });
    

    Returns Container []

    An array of all containers in the print area. By default, each print area has three basic containers in the editor: Background, Main, and Foreground.