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

Couple to fullscreen API #58

Open
martinthomson opened this issue Jun 30, 2020 · 1 comment
Open

Couple to fullscreen API #58

martinthomson opened this issue Jun 30, 2020 · 1 comment

Comments

@martinthomson
Copy link
Contributor

It has been argued that requesting access to keys is orthogonal to fullscreen access and so an orthogonal API is the right shape for this.

This is a fine argument from a purely theoretical standpoint, but it makes communicating the status of keyboard access on the web unnecessarily complicated. You can see in the demo (only viewable in Chrome) that maintaining orthogonal states has benefits, but those benefits assume a lot about how status is communicated.

The primary benefit of orthogonality is the potential for this API to be used without fullscreen access. As that has no practical realization, I don't think that it is worth keeping under the YAGNI principle. On the contrary, as allows for the creation of a state with no concrete use, it is harmful to have.

Thus, I would propose that this use an argument to requestFullScreen() as follows:

enum FullscreenKeyboardLock { "none", "browser", "system" };
dictionary FullscreenOptions {
  FullscreenKeyboardLock keyboardLock = "none";
};

(This particular spelling assumes particular resolutions to other issues that will be raised separately.)

@garykac
Copy link
Member

garykac commented Oct 19, 2020

Most of the early requests for this feature wanted it to work in windowed mode.

We opted to restrict it to full-screen only because that was a safer way to get the API implemented and available., but we still receive requests for it to work in windowed mode.

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