Closed Bug 1601229 Opened 4 years ago Closed 3 years ago

The "use in console" contextual menu item does not work for content elements in the OBT

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(Fission Milestone:MVP)

RESOLVED WORKSFORME
Fission Milestone MVP

People

(Reporter: pbro, Unassigned)

References

(Blocks 2 open bugs)

Details

Steps:

  • open any website in a tab in Firefox
  • open the OBT
  • In the OBT's inspector panel, pick an element from the content page
  • Open the split console
  • Right-click on the selected element and choose "use in console"
  • Press enter in the console

Expected: The selected element gets referenced by a new variable called temp0 and evaluating this in the console prints out the element.

Actual: The temp0 variable gets created but evaluating it returns an error: ReferenceError: temp0 is not defined.

This does work fine if the selected element belongs to the main browser UI though.

Summary: The "use in console" contextual menu item does not for content elements in the OBT → The "use in console" contextual menu item does not work for content elements in the OBT
Depends on: 1601630

Bug 1601630 will create the variable in the right context, but you'd still have an issue directly executing the filled-in input (temp0) because the console context isn't updated.

This is the same issue we have with "Store as global variable" in the console, and will be handled during the context switch project.

Priority: -- → P3

Tracking Fission DevTools bugs for Fission Nightly (M6)

Fission Milestone: --- → M6

Adding dt-fission whiteboard tag to DevTools bugs that mention Fission or block Fission meta bugs but don't already have a dt-fission whiteboard tag.

Whiteboard: dt-fission

Moving these DevTools Fission bugs from Fission's old M6 Nightly milestone to M7 Beta. I am assuming these bugs would have the dt-fission-m2-mvp whiteboard tag if they were Fission Nightly blockers.

Fission Milestone: M6 → M7

Bulk change of all bugs with whiteboard tag of dt-fission to Fission MVP milestone.

Fission Milestone: M7 → MVP
Whiteboard: dt-fission → dt-fission, dt-fission-m3-mvp

I just checked the STR and it does work for me on Nightly.
When selecting the node from the content page, the context selector switches to the content page, and evaluating the created variable works fine. This is covered by devtools/client/webconsole/test/browser/browser_jsterm_evaluation_context_selector_inspector.js

The only case where it wouldn't work would be doing the str on a node in a same-origin content iframe, as we don't create specific targets for those (at the moment). This is something that is blocking enabling the context selector on all releases.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Whiteboard: dt-fission, dt-fission-m3-mvp
You need to log in before you can comment on or make changes to this bug.