element.mount()
Shows the element inside a container of your page. A visitor in the A/B holdout gets nothing at all.
mount(target: HTMLElement | string): void;Parameters
Section titled “Parameters”targetHTMLElement | stringRequiredA CSS selector or an element. Put it where the shopper chooses a size.
Errors
Section titled “Errors”TryYourSizeError with code mount_not_found, already_mounted or element_destroyed.
Example
Section titled “Example”const guide = elements.create("sizeGuide", { product: "SKU-123" });guide.mount("#size-guide"); // or guide.mount(document.querySelector(".size-row"))// React components mount for you on commit:<SizeGuide product="SKU-123" />Was this page helpful?
Thank you. We read every answer.