private void Modern_BeforeJavascriptExecuted(object sender, BeforeJavascriptExcecutionArgs e) { var modern = _WPFWebWindow.HTMLWindow as IModernWebBrowserWindow; modern.BeforeJavascriptExecuted -= Modern_BeforeJavascriptExecuted; _Disposable = _OnWebViewCreated(e.WebView); }
internal void FireFirstLoad(CefFrame frame) { if (BeforeJavascriptExecuted != null) { Action <string> execute = (code) => frame.ExecuteJavaScript(code, string.Empty, 0); var beforeJavascriptExcecutionArgs = new BeforeJavascriptExcecutionArgs(MainFrame, execute); BeforeJavascriptExecuted(this, beforeJavascriptExcecutionArgs); } }