test
parent
741ae83498
commit
1597d5da9b
|
@ -978,7 +978,7 @@ class VariantSelects extends HTMLElement {
|
|||
this.updateMasterId();
|
||||
|
||||
document.querySelectorAll('shx-drehteller').forEach((drehteller) => {
|
||||
drehteller.reloadCurrentVariant(this.currentVariant.featured_image.alt);
|
||||
drehteller.initCurrentVariant(this.currentVariant.featured_image.alt);
|
||||
console.log("drehteller INIT", drehteller);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -27,6 +27,13 @@
|
|||
// edit inner html
|
||||
this.shadowRoot.innerHTML = `<div>Current variant: ${this.currentVariant}</div>`;
|
||||
}
|
||||
|
||||
initCurrentVariant(id) {
|
||||
this.currentVariant = id;
|
||||
|
||||
// edit inner html
|
||||
this.shadowRoot.innerHTML = `<div>Init variant: ${this.currentVariant}</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define('shx-drehteller', MyCustomElement);
|
||||
|
|
Loading…
Reference in New Issue