Bug 1428152 - Setting a customElement observedAttribute property to false should remove the attribute. r?mattn
MozReview-Commit-ID: DoYemLAwIoa
--- a/toolkit/components/payments/res/mixins/ObservedPropertiesMixin.js
+++ b/toolkit/components/payments/res/mixins/ObservedPropertiesMixin.js
@@ -27,17 +27,17 @@ function ObservedPropertiesMixin(superCl
}
// Convert attribute names from kebab-case to camelCase properties
Object.defineProperty(this, name.replace(/-([a-z])/g, ($0, $1) => $1.toUpperCase()), {
configurable: true,
get() {
return this.getAttribute(name);
},
set(value) {
- if (value === null || value === undefined) {
+ if (value === null || value === undefined || value === false) {
this.removeAttribute(name);
} else {
this.setAttribute(name, value);
}
},
});
}
}