B
B
baimkin2019-04-21 11:07:51
C++ / C#
baimkin, 2019-04-21 11:07:51

How to enable/disable image loading in CEF on the fly?

Good day to all.
I disable loading images when initializing the browser in this way:

//Настроки бразуера
BrowserSettings browserSettings = new BrowserSettings();
browserSettings.ImageLoading = CefState.Disabled;

// Initialize cef with the provided settings
Cef.Initialize(settings);
//Создаем браузер
CefWebBrowser = new ChromiumWebBrowser("https://yandex.ru")
{
      Dock = DockStyle.Fill,
      Size = new Size(600, 600),
      BrowserSettings = browserSettings
};

but enabling / disabling the loading of images in an already working browser does not work. It does not allow you
to set the settings again , it says that the browser has already been initialized. Tell me how you can disable / enable image loading in CEF on the fly? browserSettings.ImageLoading = CefState.Enabled;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question