New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requests from content in <iframe> do not raise CoreWebView2OnWebResourceRequested #2341
Comments
Thanks for this report @RendijsSmukulis! We were able to repro this issue. It will likely be fixed by implementing the WebResourceRequested event on the CoreWebView2Frame object. |
Any progress on this? |
@b-maslennikov webresourcerequested events for oop iframes are available as part of new API in prerelease. AddWebResourceRequestedFilter(String, CoreWebView2WebResourceContext, CoreWebView2WebResourceRequestSourceKinds) You will need to use |
@vbryh-msft works perfect for me. thank you |
@vbryh-msft in my app I currently use |
@Urmeli0815 - the old API should have old behavior, please let us know if it is not the case for you. Thanks. |
how to use the new api in tauri? |
With the 3rd parameter to Should I also mention this elsewhere or make a new report for it? |
@vbryh-msft I know, that's not what I meant: I have an So I had to drop the virtual host mapping and now serve those files as well from the |
@ray007 I see. Yes, please open new issue for that. If you will provide simple sample code - it will save us some time. Just setting iframe.src to mapped virtual host works but redirection to it from external url does not work - is it correct? |
@vbryh-msft yes, correct. In my case it's a login form shown in an iframe which redirects back to the js-app served from my internal url. |
@vbryh-msft @champnic, when do you plan to release |
@vbryh-msft @champnic I am also very interested in the overload for CoreWebView2.AddWebResourceRequestedFilter that takes in the third parameter making it into the release build. CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All, CoreWebView2WebResourceRequestSourceKinds.All); Without that third parameter, my WebResourceRequested handler is not getting hit for iframes. |
Why has this not been released yet? |
@RossLote it is promoted to stable in 122 prerelease . |
If you try to query the interface it will return HRESULT 80004002 and obviously the queried pointer is NULL. This is using 1.0.2357-prerelease |
@lordbendtner1337 You need to make sure you are testing with a runtime that supports that interface. So anything .2357+. The latest Edge Canary or Dev would work for this API. Here's some more info: |
IOS端bug就是严重发热,希望更新一下解决IOS发热问题! |
Description
With filters and handler set:
Loading a page that has an iframe, CoreWebView2OnWebResourceRequested callback is called for the web request that loads the main iframe page, but not for requests coming from said page residing in iframe.
For example, if page B is hosted in page A's iframe, and page B contains script C.js, we see calls for A and B in CoreWebView2OnWebResourceRequested, but not for C.js.
Version
SDK: 1.0.1150.38 (newest release)
Runtime: Evergreen
Framework: WPF
OS: Windows 10
Repro Steps
MainWindow.xaml:
MainWindow.xaml.cs:
Set up a page under "localhost:8000":
Run and observe the debug output.
Expected to see all "www.microsoft.com" page resources shown in debug, instead only the first call to "www.bing.com" shows up.
AB#38876392
The text was updated successfully, but these errors were encountered: