MCPcopy Create free account
hub / github.com/adearriba/ShopifyCheckoutJS / addContent

Method addContent

src/Components/SectionComponent.js:81–85  ·  view source on GitHub ↗

* Add a component to a content DIV inside the section * @param {BaseComponent} component Component to add * @param {number} sectionContentId If section has multiple content DIVs, the index of the content DIV where you want to add the component.

(component, sectionContentId = 0)

Source from the content-addressed store, hash-verified

79 * @param {number} sectionContentId If section has multiple content DIVs, the index of the content DIV where you want to add the component.
80 */
81 addContent(component, sectionContentId = 0)
82 {
83 if(!component || !(component instanceof BaseComponent)) throw TypeError('Object trying to add is not a component.');
84 this.contentDivs[sectionContentId].appendChild(component);
85 }
86
87 /**
88 * Add a new content DIV to the section

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected