Closed Bug 1111264 Opened 10 years ago Closed 10 years ago

Simplify check for disabled in isElementEnabled

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla37

People

(Reporter: ato, Assigned: ato)

Details

(Keywords: pi-marionette-server)

Attachments

(1 file, 1 obsolete file)

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: nobody → ato
Status: NEW → ASSIGNED
Attached file MozReview Request: bz://1111264/ato (obsolete) —
Attachment #8536082 - Flags: review?(dburns)
/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://hg.mozilla.org/mozilla-central/rev/25af7d428a32
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Attachment #8536082 - Attachment is obsolete: true
Attachment #8618921 - Flags: review+
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: