public void OnBeforeNavigate(ICefFrame frame, ICefRequest request, CefNavigationType navigation_type, bool isRedirect) { if (objectCache.TryGetValue(frame.Identifier, out var frameObjectCache)) { frameObjectCache.Values.ToList().ForEach(f => f.Dispose()); frameObjectCache.Clear(); } }
public bool OnBeforeNavigation(ICefBrowser browser, ICefFrame frame, ICefRequest request, CefNavigationType navigation_type, bool isRedirect) { if (browsers.TryGetValue(browser.Identifier, out var browserController)) { browserController.OnBeforeNavigate(frame, request, navigation_type, isRedirect); } return(false); }