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

Method constructor

src/Methods/SelectionMethod.js:5–15  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

3export class SelectionMethod extends HTMLDivElement{
4
5 constructor(element){
6 if(!(element instanceof HTMLDivElement)
7 || !element.classList.contains('radio-wrapper')){
8 throw TypeError('Not a radio-wrapper');
9 }
10
11 Object.setPrototypeOf(element, SelectionMethod.prototype);
12 return Object.assign(element, {
13 type: 'generic'
14 });
15 }
16
17 /**
18 * Add a `text` decription to the selection method

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected