I'm using CEF 3.2704.1434.gec3e9ed on Windows 10. I'm trying to get the Javascript 'onunload' and 'onbeforeunload' events to be called during Windows shutdown and logout (ie. WM_ENDSESSION). The default build of cefclient.exe doesn't trigger these JS events correctly. So I tried adding WM_ENDSESSION to the main wndproc in cefclient and then calling browser->GetHost()->CloseBrowser(). But that doesn't work either.
I do see Javascript 'onunload' called when I use Chrome.exe from Google (v51) and logout of WIndows.
Has anyone tried to hook up WM_ENDSESSION to cefclient?