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

Add manifest field for single window applications #91

Open
alancutter opened this issue Nov 17, 2023 · 2 comments
Open

Add manifest field for single window applications #91

alancutter opened this issue Nov 17, 2023 · 2 comments

Comments

@alancutter
Copy link
Collaborator

alancutter commented Nov 17, 2023

"launch_handler": { "client_mode": "navigate-existing" } effectively makes a web app single window though it explicitly does not prevent multiple windows or clients from being instantiated.

launch_handler is intended to be a declarative version of something the app can do itself programmatically in some future service worker launch event. Currently Chrome is considering removing menu options like "new window" when navigate-existing is set. This would violate the theoretical programmatic equivalence.

We should add a new manifest field e.g. "window_mode": "singular" that explicitly states the app wishes to be a single windowed app and gives the user agent permission to alter its UI around that as well as enforce it.

@alancutter
Copy link
Collaborator Author

alancutter commented Nov 17, 2023

If a web app is tabbed display mode navigate-existing isn't a good option for it to try to be single windowed as it operates on clients (tabs) rather than windows.

@mgiuca
Copy link
Member

mgiuca commented Nov 17, 2023

Thanks Alan. I agree, it may be desirable for a web app to ask the user agent to not allow multiple instances of itself (or in tabbed mode, this would mean "allow multiple tabs but only a single window").

We would never prevent the user from opening multiple browser tabs of a website, but if we move into an isolated model for installed apps (which has been discussed recently and implemented by Safari), then we can explicitly prevent multiple instances in the installed app state.

Either way, this would just be a hint, but I think it's important that we don't overload client_mode: navigate-existing to be that hint, for the reasons given above.

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

2 participants