在我的winform应用程序中,我在cefsharp浏览器中加载了一个网页。 在网页中有一个加载另一个网页的iframe。
在Chrome中加载了iframe。在应用中,iframe保持空白。
我似乎无法找到解决方案。
我添加了一个处理程序:
browser.RequestHandler = New checkFrame()
Public Class checkFrame
Implements IRequestHandler
Public Sub OnPluginCrashed(browserControl As IWebBrowser, browser As IBrowser, pluginPath As String) Implements IRequestHandler.OnPluginCrashed
End Sub
Public Sub OnRenderProcessTerminated(browserControl As IWebBrowser, browser As IBrowser, status As CefTerminationStatus) Implements IRequestHandler.OnRenderProcessTerminated
End Sub
Public Sub OnRenderViewReady(browserControl As IWebBrowser, browser As IBrowser) Implements IRequestHandler.OnRenderViewReady
End Sub
Public Sub OnResourceLoadComplete(browserControl As IWebBrowser, browser As IBrowser, frame As IFrame, request As IRequest, response As IResponse, status As UrlRequestStatus, receivedContentLength As Long) Implements IRequestHandler.OnResourceLoadComplete
End Sub
Public Sub OnResourceRedirect(browserControl As IWebBrowser, browser As IBrowser, frame As IFrame, request As IRequest, response As IResponse, ByRef newUrl As String) Implements IRequestHandler.OnResourceRedirect
End Sub
Public Function GetAuthCredentials(browserControl As IWebBrowser, browser As IBrowser, frame As IFrame, isProxy As Boolean, host As String, port As Integer, realm As String, scheme As String, callback As IAuthCallback) As Boolean Implements IRequestHandler.GetAuthCredentials
callback.Dispose()
Return False
End Function
Public Function GetResourceResponseFilter(browserControl As IWebBrowser, browser As IBrowser, frame As IFrame, request As IRequest, response As IResponse) As IResponseFilter Implements IRequestHandler.GetResourceResponseFilter
Return Nothing
End Function
Public Function OnBeforeBrowse(browserControl As IWebBrowser, browser As IBrowser, frame As IFrame, request As IRequest, isRedirect As Boolean) As Boolean Implements IRequestHandler.OnBeforeBrowse
Return False
End Function
Public Function OnBeforeResourceLoad(browserControl As IWebBrowser, browser As IBrowser, frame As IFrame, request As IRequest, callback As IRequestCallback) As CefReturnValue Implements IRequestHandler.OnBeforeResourceLoad
'Console.Write(request.Url + Environment.NewLine)
Return CefReturnValue.Continue
End Function
End Class
是否有任何机构知道我需要更改或添加以便iframe被加载?
由于