pull/1/head
Jan Umbach 2024-05-30 13:36:04 +02:00
parent 3e1693ad5a
commit e23c8c5c99
1 changed files with 6 additions and 1 deletions

View File

@ -108,14 +108,19 @@
} }
class CustomVariantDescriptionElement extends HTMLElement { class CustomVariantDescriptionElement extends HTMLElement {
static get observedAttributes() { return ['class', 'style', 'id']; } // Add any other attributes you want to observe
constructor() { constructor() {
super(); super();
this.style.display = 'block'; this.style.display = 'block';
// "variant" is the id of the variant // "variant" is the id of the variant
this.variant = this.getAttribute('variant'); this.variant = this.getAttribute('variant');
this.currentVariant = null; this.currentVariant = null;
}
attributeChangedCallback(name, oldValue, newValue) {
this.removeAttribute(name);
} }
initVariantDescription(id) { initVariantDescription(id) {