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

Method insertAfter

src/Components/BaseComponent.js:23–26  ·  view source on GitHub ↗

* Insert the current component after 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

21 * @throws {TypeError} Object trying to add is not a component
22 */
23 insertAfter(component){
24 if(!component || !(component instanceof BaseComponent)) throw TypeError('Object trying to add is not a component.');
25 this.insertAdjacentElement('afterend', component);
26 }
27
28 /**
29 * Insert the current component before the specified component parameter.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected