CefSharp 笔记-1

Cefsharp新版升级之后,原先的注册js对象方法被遗弃了,需要使用新方法,如下:

//Old method
browser.RegisterJsObject("bound", new BoundObject(), options: BindingOptions.DefaultBinder);

//Replaced with
CefSharpSettings.LegacyJavascriptBindingEnabled = true;
CefSharpSettings.WcfEnabled = true;
browser.JavascriptObjectRepository.Register("bound", new BoundObject(), isAsync:false, options: BindingOptions.DefaultBinder);

  

posted on 2020-12-04 09:35  4job  阅读(217)  评论(0编辑  收藏  举报

导航