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

Method constructor

src/Components/BaseComponent.js:2–16  ·  view source on GitHub ↗
(args = null)

Source from the content-addressed store, hash-verified

1export class BaseComponent extends HTMLDivElement{
2 constructor(args = null)
3 {
4 let componentType = 'component';
5 if(args)
6 {
7 componentType = args.type ?? 'component';
8 }
9
10 let element = document.createElement('div');
11 Object.setPrototypeOf(element, BaseComponent.prototype);
12
13 return Object.assign(element, {
14 componentType
15 });
16 }
17
18 /**
19 * Insert the current component after the specified component parameter.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected