To allow any UI interaction with the extensions in our app, or to shim (modify) some of the chrome extension APIs, we first had to establish a way to communicate between our app and the extension. The currently selected method is to:
attach a chrome devtools session to the extension through "Target.attachToTarget"
for extension-to-app communication, "Runtime.bindingCalled" is called to create a method on the extension JS side, calling which will invoke the "Runtime.bindingCalled" event on app side
for app-to-extension communication, we have multiple approaches, e.g. directly calling JS code from app through "Runtime.evaluate"
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?
Nice to have. There are other ways to tackle this, but having official API support would be beneficial.
Suggested implementation
No response
What does your app do? Is there a pending deadline for this request?
Describe the feature/enhancement you need
To allow any UI interaction with the extensions in our app, or to shim (modify) some of the chrome extension APIs, we first had to establish a way to communicate between our app and the extension. The currently selected method is to:
Target.attachToTarget
"Runtime.bindingCalled
" is called to create a method on the extension JS side, calling which will invoke the "Runtime.bindingCalled
" event on app sideRuntime.evaluate
"However, it would significantly ease any interop work if WebView2 provided same message exchange API for extensions as it does for webpages (https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/communicate-btwn-web-native)
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?
Nice to have. There are other ways to tackle this, but having official API support would be beneficial.
Suggested implementation
No response
What does your app do? Is there a pending deadline for this request?
No response
AB#46892739