Skip to content

Commit

Permalink
Add comment about radio button activation muddiness
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Jan 14, 2020
1 parent 52109d5 commit c292572
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/jsdom/living/nodes/HTMLInputElement-impl.js
Expand Up @@ -165,6 +165,8 @@ class HTMLInputElementImpl extends HTMLElementImpl {
}

_legacyPreActivationBehavior() {
// The spec says we should check this._mutable here, but browsers don't seem to implement this behavior. See
// https://github.com/whatwg/html/issues/3239.
if (this.type === "checkbox") {
this.checked = !this.checked;
} else if (this.type === "radio") {
Expand All @@ -174,6 +176,8 @@ class HTMLInputElementImpl extends HTMLElementImpl {
}

_legacyCanceledActivationBehavior() {
// The spec says we should check this._mutable here, but browsers don't seem to implement this behavior. See
// https://github.com/whatwg/html/issues/3239.
if (this.type === "checkbox") {
this.checked = !this.checked;
} else if (this.type === "radio") {
Expand Down

0 comments on commit c292572

Please sign in to comment.