Closed Bug 1428152 Opened 2 years ago Closed 2 years ago

Setting a customElement observedAttribute property to false should remove the attribute

Categories

(Firefox :: WebPayments UI, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: jaws, Assigned: jaws)

Details

(Whiteboard: [webpayments])

Attachments

(1 file)

Following the style of HTML, when using our custom elements with the observedAttributes mixin, if we set a property to false it is expected that the associated attribute should be removed. Otherwise we will have to write CSS that explicitly checks the value of the attribute instead of the presence.

For example:

rich-select[open] {
}

vs:

rich-select[open]:not([open="false"]) {
}
Comment on attachment 8939943 [details]
Bug 1428152 - Setting a customElement observedAttribute property to false should remove the attribute.

https://reviewboard.mozilla.org/r/210226/#review215950

Thanks!
Attachment #8939943 - Flags: review?(MattN+bmo) → review+
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7a9145afd37
Setting a customElement observedAttribute property to false should remove the attribute. r=MattN
https://hg.mozilla.org/mozilla-central/rev/f7a9145afd37
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Whiteboard: [webpayments]
Product: Toolkit → Firefox
Target Milestone: mozilla59 → Firefox 59
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.