我在 WPF 控件中使用 WebView2 来托管新的边缘。
在我的代码中,我想将 cookie 和浏览器特定数据缓存到缓存目录。创建 CoreWebView2Environment 时,应在 CoreWebView2EnvironmentOptions 中设置缓存位置。
有什么办法可以做到这一点吗?提前致谢。
根据设计,electron.js 包含现代 Web 浏览器的所有功能:渲染引擎、视频/音频支持、Web RTC 等。
因此,electron.js 应用程序很大,内存占用很大,启动速度相对较慢。
您知道吗,是否可以从源代码构建 electron.js 并去除 Chromium 未使用/不需要的功能?
我想要更小的二进制文件和更快的启动时间。
如何覆盖右键单击 WebView2 控件时出现的 ContextMenu?
当您右键单击 WebView2 控件时,会出现带有“刷新”、“另存为”等选项的标准上下文菜单。
如何让我自己的 ContextMenuStrip 出现而不是在鼠标右键单击期间出现?
我正在尝试在 VSTO Excel 插件中使用 CefSharp WindowForm 控件。CefSharp.WinForms 版本是 75.1.142,我正在 Excel 2013(64 位)到 VS 2017 上制作插件。
我收到 FileNotFoundException: '无法加载文件或程序集 'CefSharp, Version=75.1.142.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138' 或其依赖项之一。该系统找不到指定的文件。' 在下面的代码执行中。
public void InitBrowser()
{
var cefSettings = new CefSettings();
cefSettings.MultiThreadedMessageLoop = true;
// I'm setting current directory to D:\\CEF\\cefsharp\\ExcelWinform\\ExcelWinformAddIn\\bin\\x64\\Debug\\ where all the CefSharp dlls and dependencies are present.
cefSettings.BrowserSubprocessPath = "D:\\CEF\\cefsharp\\ExcelWinform\\ExcelWinformAddIn\\bin\\x64\\Debug\\CefSharp.BrowserSubprocess.exe";
if (!Cef.Initialize(cefSettings, performDependencyCheck: true, browserProcessHandler: null))
{
throw new Exception("Unable to Initialize Cef");
}
browser = new ChromiumWebBrowser("http://www.google.com");
{
Dock = DockStyle.Fill;
}
BrowserSettings browserSettings …Run Code Online (Sandbox Code Playgroud)