MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Usable Devtools Overlay.setInspectMode

Open
#2,018 4 comments 0 reactions 1 assignee View on GitHub

@champnic is already working on this.

Since Dec 16, 2021.

feature request priority-low tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
As a starting point think of the Microsoft Edge Devtools Inspector: on the left hand the original site where an mini-inspector pops up on mouse over, on the right hand a full features inspector.

It is not possible with WebView2 to:

  • change the layout of the mini-inspector to a fully custom one, if more so one which could be interacted with by:
    • clicking the inspected element the mini-inspector stays and doesn't change
    • interaction with elements of the mini-inspector would be possible
  • having a constant stream of nodeHighlightRequested when the inspected element changes so that a full featured inspector could be implemented easily
  • reuse elements of the build-in full featured inspector

Describe the solution you'd like and alternatives you've considered

  • have a webView.CoreWebView2.SetDevToolsOverlayInspectorLayoutAsync call to set the mini-inspector layout
  • webView.CoreWebView2.CallDevToolsProtocolMethodAsync("Overlay.setInspectMode", ...); should start an event for each new mouse over DOM element as the mini-inspector changes...

Alternatives:

  • compile and ship a modified chromium where at least the layout of the mini-inspector could be changed. But there might be source changes needed to get the described behaviour...
  • adding an transparent "overlay" view, getting the DOM-node information by mouse position and drawing the mini-inspector popup on it. But then there might be issues with scrolling (as there are now anyway because the mouse over doesn't change while scrolling, e.g. the mini-inspector doesn't get updated...)
  • an webView API which is given a custom overlay view so it can overlay and intercept mouseclicks and stop them from being send to the CoreWebView2 ... . Resizing etc. is done be the webView container/parent.

AB#37414493

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.