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

chrome.app.window reference lost after reload #5294

Closed
AndryBray opened this issue Sep 12, 2016 · 1 comment
Closed

chrome.app.window reference lost after reload #5294

AndryBray opened this issue Sep 12, 2016 · 1 comment
Assignees

Comments

@AndryBray
Copy link

AndryBray commented Sep 12, 2016

This bug is related to : #5181

chrome.app.window.getAll() will return NULL values if you try to reload the content (CMD+R) of window.
I think this shouldn't be the normal behaviour.

Tested on 0.18 beta-1 on Windows 7 and MacOS X.

This feature is important to check which instance is opened every time and I don't want to allow opening the same window multiple times.

Example
Supposing we are running the app with those windows:
window 1 = myapp.com/app1.html
window 2 = myapp.com/app2.html
..
window N = myapp.com/appN.html

If the user click a link with url "myapp.com/app1.html" the Window 1 must be focused (instead to open a new window).

What is the best way to know every opened window?
I was trying with nw.global.__windows and with chrome.app.window.getAll() but both are bugged, is there any other way (native/api way)
In the past I used a global object where to track every window... but I had to fight with memory leaks and issues like that.

@rogerwang rogerwang self-assigned this Sep 18, 2016
@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

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

No branches or pull requests

2 participants