Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I share Global and single instance between popup window and main window on nw0.81? #8176

Open
dyk98 opened this issue Mar 27, 2024 · 0 comments

Comments

@dyk98
Copy link

dyk98 commented Mar 27, 2024

I use nw.Window.open to open a popup window in nw0.54. Popup window and main window have the same 'window.global' object
image
But when I upgrade to nw0.81, window.global is not shared
image
I fix this problem by use nw.Window.open callback like childWindow.window.global = window.global, but I don't think it's a good fix function. Do I have another function to share window.global?

Then I meet another problem, I export a single instance in Q.ts like export = new TokenManager(). TokenManger have a object called tokenMap, tokenMap have different value between main window and popup window, but in nw0.54, it's same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant