Closed Bug 1578753 Opened 4 years ago Closed 4 years ago

Make the Style Editor support target switching


(DevTools :: Style Editor, enhancement, P1)



(Fission Milestone:M6, firefox73 fixed)

Firefox 73
Fission Milestone M6
Tracking Status
firefox73 --- fixed


(Reporter: ochameau, Assigned: daisuke)



(Whiteboard: dt-fission-m2-mvp)


(3 files)

Bug 1565263 landed the TargetList API which helps support switching to another target (as well as supporting the additional remote iframe target).
But we should followup in each tool in order to start using this new API.
The very first goal is to:

  • stop memoizing the target/targetFront and may be also the target scoped front (inspector, console, thread, storage, ...). Instead we should use toolbox.targetList.targetFront in order to query for the current top level target front.
  • support target switching by using TargetList.watchTargets. In a first iteration we would only care about the top level target. In order to do so, we can check for the isTopLevel argument being passed to the two callbacks register to watchTargets:
    (type, targetFront, isTopLevel) => {
      if (isTopLevel) {
        // A new top level target is available
        // This will be fired on toolbox opening, for the first one,
        // And then, evertime we navigate to another process.
        // For now, you would need `` to be set to true
        // And navigate from any http website to about:robots, which loads into the parent process. Or enable Fission and navigate between two distinct top level domains.
    (type, targetFront, isTopLevel) => {
      if (isTopLevel) {
        // A top level target has been destroyed

See bug 1565263 for how we migrated the console or bug 1578242 for the inspector.

Priority: -- → P3
Assignee: nobody → daisuke
Blocks: 1592575
Blocks: 1602791
No longer blocks: 1602791
Whiteboard: dt-fission-m2-mvp

Tracking dt-fission-m2 bugs for Fission Nightly (M6)

Fission Milestone: --- → M6
See Also: → 1604126
Pushed by
Use the current target of TargetList. r=jdescottes,ochameau
Reflect the switching of the top-level target. r=jdescottes,ochameau
Add a test for top-level target switing. r=jdescottes,ochameau
Priority: P3 → P1
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.