by mmarczell » Fri Jul 03, 2020 7:37 am
The above solution (admittedly 8 years old) doesn't seem to work in the version we're using (v83).
This is the sequence of events I'm observing:
1. I call CreateBrowser from the main thread with URL A
2. I call LoadURL from OnAfterCreated with URL B
3. OnBeforeBrowse is called with URL B
4. OnBeforeBrowse is called with URL A
5. CEF appears showing URL A
My usecase would be: (on a Mac)
- The app is not running
- The user drags a file onto the app
- NSApplication and the app delegate is created. This calls CreateBrowser with URL A (default starting screen for the app)
- application:openFile: is called on the app delegate. In here I save URL B (that would show the content of the opened file) somewhere to be opened later
- OnAfterCreated would be the opportunity to override what URL we show on start.