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

Method constructor

src/Methods/ShippingMethod.js:4–13  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

2
3export class ShippingMethod extends SelectionMethod{
4 constructor(element){
5 super(element);
6 Object.setPrototypeOf(this, ShippingMethod.prototype);
7
8 this.type = 'shipping';
9 this.addEventListener('change', () => {
10 let event = new CustomEvent(`checkout:shippingmethod:changed`, { detail: this });
11 document.dispatchEvent(event);
12 });
13 }
14
15 addDescription(text){
16 let span = this.querySelector('.radio__label__primary');

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected