test
parent
3e1693ad5a
commit
e23c8c5c99
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue