If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Simplify check for disabled in isElementEnabled

RESOLVED FIXED in mozilla37

Status

Testing
Marionette
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: ato, Assigned: ato)

Tracking

({ateam-marionette-server})

unspecified
mozilla37
ateam-marionette-server
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
The check for whether an element is disabled in isElementEnabled checks if the value of el.disabled is undefined,  otherwise it sends a true boolean explicitly.

This is necessary since the double exclamation marks already used will coerce any return value, i.e. undefined, to a boolean.

Hence, the whole condition can be replaced simply with !!!el.disabled.
(Assignee)

Updated

3 years ago
Assignee: nobody → ato
Status: NEW → ASSIGNED
Keywords: ateam-marionette-server
(Assignee)

Comment 1

3 years ago
Created attachment 8536082 [details]
MozReview Request: bz://1111264/ato
Attachment #8536082 - Flags: review?(dburns)
(Assignee)

Comment 2

3 years ago
/r/1457 - Bug 1111264 - Simplify check for disabled in isElementEnabled; r=dburns

Pull down this commit:

hg pull review -r 1c89e073ccbdfd74e7e7e3f9f7a774683761bf22
Attachment #8536082 - Flags: review?(dburns) → review+
https://reviewboard.mozilla.org/r/1455/#review907

Ship It!
(Assignee)

Comment 4

3 years ago
try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=24c375b2bbbd
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/25af7d428a32
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/25af7d428a32
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
(Assignee)

Comment 7

2 years ago
Comment on attachment 8536082 [details]
MozReview Request: bz://1111264/ato
Attachment #8536082 - Attachment is obsolete: true
Attachment #8618921 - Flags: review+
(Assignee)

Comment 8

2 years ago
Created attachment 8618921 [details]
MozReview Request: Bug 1111264 - Simplify check for disabled in isElementEnabled; r=dburns
You need to log in before you can comment on or make changes to this bug.