test
parent
3e1693ad5a
commit
e23c8c5c99
|
@ -108,16 +108,21 @@
|
|||
}
|
||||
|
||||
class CustomVariantDescriptionElement extends HTMLElement {
|
||||
static get observedAttributes() { return ['class', 'style', 'id']; } // Add any other attributes you want to observe
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.style.display = 'block';
|
||||
|
||||
// "variant" is the id of the variant
|
||||
|
||||
this.variant = this.getAttribute('variant');
|
||||
this.currentVariant = null;
|
||||
}
|
||||
|
||||
attributeChangedCallback(name, oldValue, newValue) {
|
||||
this.removeAttribute(name);
|
||||
}
|
||||
|
||||
initVariantDescription(id) {
|
||||
this.currentVariant = id;
|
||||
|
||||
|
|
Loading…
Reference in New Issue