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

Method insertBefore

src/Components/BaseComponent.js:33–36  ·  view source on GitHub ↗

* Insert the current component before the specified component parameter. * @param {BaseComponent} component * @throws {TypeError} Object trying to add is not a component

(component)

Source from the content-addressed store, hash-verified

31 * @throws {TypeError} Object trying to add is not a component
32 */
33 insertBefore(component){
34 if(!component || !(component instanceof BaseComponent)) throw TypeError('Object trying to add is not a component.');
35 this.insertAdjacentElement('beforebegin', component);
36 }
37}

Callers 1

addFieldMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected