Closed Bug 177153 Opened 23 years ago Closed 23 years ago

Clean up code for toggling items

Categories

(Other Applications :: DOM Inspector, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: caillon, Assigned: caillon)

Details

Attachments

(1 file)

There are several methods like: toggleFoo(aExplicit, aValue) { var val = aExplicit ? aValue : !this.mFoo; // do stuff with the value } this bug is to clean those up since the aExplicit parameter is quite useless. For one, you can tell in JS if there is a parameter or not just by checking the typeof it. Secondly, these should probably be replaced by a toggleFoo() and setFoo(aValue), depending on what the caller wants to do.
Attachment #104395 - Flags: review+
Comment on attachment 104395 [details] [diff] [review] patch > + setBrowser: function(aValue, aShouldOpen) aShouldOpen would make more sense as aToggleSplitter, no? + toggleSearch: function(aShouldOpen) Same. With those changes, sr=bzbarsky
Attachment #104395 - Flags: superreview+
Landed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: