No onunload event during Windows shutdown/logout

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

No onunload event during Windows shutdown/logout

Postby kavadog » Tue Aug 02, 2016 1:47 pm

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?
kavadog
Techie
 
Posts: 28
Joined: Mon Jul 27, 2015 5:46 pm

Return to Support Forum

Who is online

Users browsing this forum: kimcey and 27 guests