Cefsharp: LoadHtml/RegisterResourceHandler displays empty page

Created on 23 Aug 2019  路  3Comments  路  Source: cefsharp/CefSharp

  • What version of the product are you using?
    75.1.141

  • What architecture x86 or x64?
    Either

  • On what operating system?
    Win 10

  • Are you using WinForms, WPF or OffScreen?
    All

  • What steps will reproduce the problem?
    Call LoadHtml without setting browser.RequestHandler

  • What is the expected output? What do you see instead?
    Html to load, instead only a blank screen.

Originally reported in https://github.com/cefsharp/CefSharp/issues/2788#issuecomment-522976148

bug

Most helpful comment

Current implementation checks if RequestHandler is null then returns NULL which is incorrect.
https://github.com/cefsharp/CefSharp/blob/cefsharp/75/CefSharp.Core/Internals/ClientAdapter.cpp#L542

Workaround in the short term is to set the RequestHandler to the default implementation.
c# browser.RequestHandler = new CefSharp.Handler.RequestHandler();

All 3 comments

Current implementation checks if RequestHandler is null then returns NULL which is incorrect.
https://github.com/cefsharp/CefSharp/blob/cefsharp/75/CefSharp.Core/Internals/ClientAdapter.cpp#L542

Workaround in the short term is to set the RequestHandler to the default implementation.
c# browser.RequestHandler = new CefSharp.Handler.RequestHandler();

Updated title as this also is a problem for RegisterResourceHandler which LoadHtml uses.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rfgamaral picture rfgamaral  路  4Comments

marci4 picture marci4  路  4Comments

avspeed picture avspeed  路  6Comments

SimonTheCat picture SimonTheCat  路  3Comments

Spocher picture Spocher  路  4Comments