Skip to content

Couple to fullscreen API #58

Open
Open
@martinthomson

Description

@martinthomson

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions