CarbonMan
CarbonMan

Reputation: 4490

Using cefSharp how do I get the URL of the iframe in the LoadingStateChanged event?

When I load a page into an iFrame my event handler is called

void webBrowser_LoadingStateChanged(object sender, CefSharp.LoadingStateChangedEventArgs e)

But when I look at e.Browser.FocusedFrame.Url the address is the address of the parent page. How do I access the URL for the iFrame?

Upvotes: 1

Views: 1312

Answers (1)

CarbonMan
CarbonMan

Reputation: 4490

Rather than using the LoadingStateChanged use the FrameLoadEnd event instead. Then you can use the FrameLoadEndEventArgs.Frame.Url

Upvotes: 1

Related Questions