Closed Bug 1741811 Opened 3 years ago Closed 3 years ago

Make `watchTargets` take a single object param

Categories

(DevTools :: Framework, task)

task

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

At the moment, the function can receive up to 4 parameter (https://searchfox.org/mozilla-central/rev/bc5e79f3ae0f42cb4a6ebd05fc32f48a3829059d/devtools/shared/commands/target/target-command.js#639), some of them which aren't mandatory (onDestroy and onSelect), which can make the callsites a bit weird.

Putting those params in a single object (i.e. watchTargets({types, onAvailable, onDestroy, onSelect})) would make the callsites more explicit

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5dc30455b150
[devtools] Make watchTargets take a single object param. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: