How to load an extension in a cefsharp WPF project?

有些话、适合烂在心里 提交于 2021-02-11 14:42:29

问题


I'm trying to load an extension in cefsharp embedded browser in a WPF project. But application freezes while doing so. Here is the code I have been doing to load a very simple extension:

    var setting = new CefSettings();
    setting.RegisterExtension(
            new V8Extension(
                "test",
                "document.body.style.backgroundColor='red'"));
    Cef.Initialize(setting);

Any help would be appreciated.

来源:https://stackoverflow.com/questions/59334116/how-to-load-an-extension-in-a-cefsharp-wpf-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!