Closed Bug 1924710 Opened 1 year ago Closed 1 year ago

Fire onTargetSelected on startup to pick the visible target

Categories

(DevTools :: General, enhancement)

enhancement

Tracking

(firefox134 fixed)

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(2 files)

For now, we are using both onTargetAvailable and onTargetSelected to pick the displayed target, notably in the inspector and accessibility panel.
There is some redundancy between these two listeners. The onTargetAvailable consider any top level target as one to select and display.
This also make the top level target special and be always selected by default. In bug 1754452, the default selected target may not be the top one.

This helps:

  • factorize some duplicated code between target available and selected,
  • selecting a target other than the top level one by default,
  • reduce the importance of "top level" target checks,
    which may allow to start frontend without one such target.
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/18165b1a2c83 [devtools] Call onTargetSelected on initialization and navigation with the current top level target. r=devtools-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/e4aa32d0fc2b [devtools] Wait for Accessibility proxy initialization and not some of its internal. r=devtools-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: