onbeforeunload in a multi-browser environment

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.

onbeforeunload in a multi-browser environment

Postby itaibh » Sun Jan 25, 2015 7:52 am

I'm trying to create a tabbed browser that behaves like chromium:
When closing the browser, if at least one tab has the 'beforeunload' event registered to, that tab becomes selected and the entire closing process stops until the user makes a selection. If the user selects "stay on this page", the entire closing process is cancelled.

What I can't get done is understanding which tab is registered to the 'beforeunload' event without calling the 'closebrowser' method, but then tabs that don't have that even registered just close.
Is there any way to get it done?

Thanks,
Itai.
itaibh
Techie
 
Posts: 25
Joined: Mon Mar 10, 2014 10:12 am

Re: onbeforeunload in a multi-browser environment

Postby magreenblatt » Tue Jan 27, 2015 2:35 pm

We would need to expose the WebContents::NeedToFireBeforeUnload method via CefBrowserHost. Feel free to add an issue.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 11 guests