Closed
Bug 177153
Opened 23 years ago
Closed 23 years ago
Clean up code for toggling items
Categories
(Other Applications :: DOM Inspector, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: caillon, Assigned: caillon)
Details
Attachments
(1 file)
|
7.66 KB,
patch
|
timeless
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•23 years ago
|
||
Attachment #104395 -
Flags: review+
Comment 2•23 years ago
|
||
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+
| Assignee | ||
Comment 3•23 years ago
|
||
Landed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: Core → Other Applications
Updated•18 years ago
|
QA Contact: timeless → dom-inspector
You need to log in
before you can comment on or make changes to this bug.
Description
•