MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Feature]: [Extensions] Chrome extension API shim implementation
@Lakshmisha-KS is already working on this.
Since Feb 12, 2025.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Describe the feature/enhancement you need
There are two kinds of shims (API method replacements) we utilize to modify the behaviour of chrome extension API (e.g. chrome.tabs.query):
- Pure JS, living in the extension only
- Ones which include interop with native layer (i.e. the app)
Pure JS shims are straight-forward, we inject some JS that replaces an existing JS function with a different JS function.
Interop ones are trickier, as we have not discovered a way to establish interop communication with the app in a sync method (while async ones and ones that return a promise are fine).
It would be great if WebView2 provided a way to easily replace existing chromium extension API methods with implementations where native layer can provide a response (an example again being the chrome.tabs.query method - only the native app has the concept of tab/window relationships)
The scenario/use case where you would use this feature
As we're building a browser with intention to host extensions, some amount of app-to-extension communication needs to happen as we need to re-implement some of the chrome extension APIs, e.g. chrome.tabs.query
How important is this request to you?
Impactful. My app's user experience would be significantly compromised without it.
Suggested implementation
No response
What does your app do? Is there a pending deadline for this request?
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.