You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing this issue in my app maybe 40-50% of the time, but in the WebView2 sample, I see it 100% of the time.
This might be specific to this website, but I'm seeing cases where FrameCreated isn't firing for a nested iframe.
For my general usecase, I haven't seen this problem, but since I don't know if this could start happening for the page I load in iframes, I'm marking this as Important out of caution. If we determine that this happens because of this specific site, then we can mark this Low.
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Prerelease (Edge Canary/Dev/Beta)
Runtime Version
135.0.3146.0 canary
SDK Version
1.0.3116 pre-release
Framework
Winforms
Operating System
Windows 11
OS Version
24H2 OS Build 26100.2894
Repro steps
Setup:
open the WebView2 Sample WinForms app
In BrowserForm.cs, replace the body of WebView_HandleIFrames with:
var frame = args.Frame;
if (frame.Name == "myFrame")
{
var breakHere = true;
}
frame.FrameCreated += WebView_HandleIFrames;
Replace the iframe in that page with: <iframe src="https://example.com" name="myFrame"></iframe>
Notice that the breakpoint doesn't get hit
Alternatively, if you open devtools on that page and run this code: const a = document.createElement("iframe"); a.name = "myFrame"; a.src = "https://example.com"; document.body.appendChild(a);, then the breakpoint will get hit.
Like I said above, in my app, I see this roughly half the time, but can repro every time in the webview2 sample app. Maybe some kind of race condition?
Notably, this page creates a ton of iframes. Maybe this doesn't repro with a simpler page.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered:
Consider using the NestedFrameCreated event handler in CoreWebView2. This event will fire for all nested frame created events on CoreWebView2. You can subscribe to the CoreWebView2::NestedFrameCreated event to track all nested frames.
Example:
webView2.CoreWebView2.add_NestedFrameCreated(
new EventHandler<CoreWebView2FrameCreatedEventArgs>((sender, args) =>
{
var frame = args.Frame;
if (frame.Name == "myFrame")
{
var breakHere = true;
}
}));
What is NestedFrameCreated? Are you talking about the FrameCreated event that I can subscribe to on the Frame object? This is exactly what I'm doing in my example. @sivMSFT
What happened?
I'm seeing this issue in my app maybe 40-50% of the time, but in the WebView2 sample, I see it 100% of the time.
This might be specific to this website, but I'm seeing cases where
FrameCreated
isn't firing for a nested iframe.For my general usecase, I haven't seen this problem, but since I don't know if this could start happening for the page I load in iframes, I'm marking this as Important out of caution. If we determine that this happens because of this specific site, then we can mark this Low.
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Prerelease (Edge Canary/Dev/Beta)
Runtime Version
135.0.3146.0 canary
SDK Version
1.0.3116 pre-release
Framework
Winforms
Operating System
Windows 11
OS Version
24H2 OS Build 26100.2894
Repro steps
Setup:
WebView_HandleIFrames
with:breakHere
variableRepro steps:
<iframe src="https://example.com" name="myFrame"></iframe>
Alternatively, if you open devtools on that page and run this code:
const a = document.createElement("iframe"); a.name = "myFrame"; a.src = "https://example.com"; document.body.appendChild(a);
, then the breakpoint will get hit.Like I said above, in my app, I see this roughly half the time, but can repro every time in the webview2 sample app. Maybe some kind of race condition?
Notably, this page creates a ton of iframes. Maybe this doesn't repro with a simpler page.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: