Global js variable available for all browsers and/or popups?

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.

Global js variable available for all browsers and/or popups?

Postby sat » Wed Mar 14, 2018 5:41 am

Hi,

I have 1 browser and some popups created from that browser, is it possible to share data (JS object) across parent windows and all popups ?
sat
Techie
 
Posts: 20
Joined: Thu Mar 26, 2015 8:59 am

Re: Global js variable available for all browsers and/or pop

Postby magreenblatt » Wed Mar 14, 2018 1:39 pm

Are the popups in the same origin? Then you should be able to script between them. For example: https://javascript.info/cross-window-communication
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Global js variable available for all browsers and/or pop

Postby sat » Fri Mar 16, 2018 10:15 am

magreenblatt wrote:Are the popups in the same origin? Then you should be able to script between them. For example: https://javascript.info/cross-window-communication

They are from the same origin. As I understood cross-window communication allows only messaging between windows.
Is it possible to have some global data available for reading/modifying from both windows at the same time ?
sat
Techie
 
Posts: 20
Joined: Thu Mar 26, 2015 8:59 am

Re: Global js variable available for all browsers and/or pop

Postby magreenblatt » Fri Mar 16, 2018 1:17 pm

You can add JavaScript bindings in all windows. They will share the same renderer process, so you can manage the data there. See https://bitbucket.org/chromiumembedded/ ... gration.md
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 64 guests