I'm trying to get the Page.windowOpen event to fire when using CefSharp
Here is the sample code
let browser = new ChromiumWebBrowser("https://www.google.com")
//removed code that waits for browser to load
let client = browser.GetDevToolsClient()
client.Page.WindowOpen.Add(fun x -> Console.WriteLine(x.Url))
browser.ShowDevTools() //window.open('https://www.wikipedia.org') via console, event does not fire
client.Runtime.EvaluateAsync("window.open('https://www.wikipedia.org')") //event does not fire
The windowOpen docs are scant on detail, and I'm assuming this event should fire from the context of the page that is executing the window.open()
js function
The window does physically open, but no event fires.
Where is the problem ?
- My implementation
- CefSharp
- Cef