MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Feature]: [Extensions] Excluding Certain WebView2 instances From access by extensions

Open
#3,855 1 comment 0 reactions 2 assignees View on GitHub

@Lakshmisha-KS is already working on this.

Since Feb 12, 2025.

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

Description

Describe the feature/enhancement you need

We have currently identified a way to have UI-enabled working extensions. However, as we host them in a WebView2, and there is no way to completely exclude a certain webview2 from the chrome.tabs.query API result while keeping the same core webview2 context. In the specific case we saw in multiple extensions, extension's popup will call chrome.tabs.query to find the currently active tab, to find its url. However, as the extension is hosted in a webview2, the "currently active tab" is actually itself.

This will likely not be an issue when WebView2 ships full extension support (with UI enabled), however providing tools to fix the above issue would be a good stop-gap measure to allow devs to experiment with extension UI hosting before official UI support is released.

Similarly, other kinds of access should be limited (e.g. currently, when we host two extensions, extension A can run content scripts and add context menus to extension B's page)

The scenario/use case where you would use this feature

Whenever hosting UI-enabled extensions

How important is this request to you?

Critical. My app's basic functions wouldn't work without it.

Suggested implementation

No response

What does your app do? Is there a pending deadline for this request?

No response

AB#46892710

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.