You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"You can close a window from the main thread, but only if it's open by another document" - message appears when trying to close a page by itself
What about those "go to your mail box and verify your code/identity" scenarios where a new page is open by another application? when i open up the new verification page from the mail client, then the previus old "go to your mail" pages becomes completely useless. I would like to close this tab.
Or a friend is calling you face to face - click on this desktop notification to answer (open) the conversation.
When the conversation ends you want to close the window. in that senario you would have wish you had open the window from another tab so the it has a opener and could be closed.
In this senario you have a opener (a desktop notification triggered by a service worker) but the service worker can't close the window on itself.
Could Service Worker have a more secure context and awareness of which window clients are open that it could circumvent the restriction of what window.close() has?
I know it could be bad to close the client if it where the last tab open, but what if browser instead open about:blank or the home screen in those scenarios so the browser itself would not closed down? child frames would switch to about:blank
maybe instead of a .close() there was a .terminate() method that could terminate both tabs and other web workers.
The text was updated successfully, but these errors were encountered:
Right now (in Chrome at least) a window can close itself if it was opened with script (window.open) or from another page with target="_blank". It seems reasonable that this should work for service worker opened pages too.
I think a serviceworker should be able to close any top-level window in its scope. Cause sometimes an application requires single instance to work properly.
"You can close a window from the main thread, but only if it's open by another document" - message appears when trying to close a page by itself
What about those "go to your mail box and verify your code/identity" scenarios where a new page is open by another application? when i open up the new verification page from the mail client, then the previus old "go to your mail" pages becomes completely useless. I would like to close this tab.
Or a friend is calling you face to face - click on this desktop notification to answer (open) the conversation.
When the conversation ends you want to close the window. in that senario you would have wish you had open the window from another tab so the it has a opener and could be closed.
In this senario you have a opener (a desktop notification triggered by a service worker) but the service worker can't close the window on itself.
Could Service Worker have a more secure context and awareness of which window clients are open that it could circumvent the restriction of what
window.close()
has?I know it could be bad to close the client if it where the last tab open, but what if browser instead open about:blank or the home screen in those scenarios so the browser itself would not closed down? child frames would switch to about:blank
maybe instead of a
.close()
there was a.terminate()
method that could terminate both tabs and other web workers.The text was updated successfully, but these errors were encountered: