[w3c/permissions] Reflect `fullscreen` state (#145)

Noted in an [unrelated TAG review](https://github.com/w3ctag/design-reviews/issues/159), there doesn't appear to be either `request()` or reflection provided for fullscreen. As the Permissions API is a unified way to request these sorts of things, it seems natural to provide:

```js
navigator.permissions.request({
    name: "fullscreen",
    element: document.getElementById("foo")
}).then((status) => { console.log("state:", status.state); });
```

And perhaps reflect:

```js
// Roughly: https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreenEnabled
navigator.permissions.query({ name: "fullscreen" }).then(...);

// Add a FullscreenPermissionDescriptor to reflect status:
navigator.permissions.query({ name: "fullscreen" }).then((status) => {
  console.log(status.state);
  console.log(status.fullscreenElement);
  // ...
});
```

Thoughts?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/145

Received on Friday, 28 April 2017 06:35:29 UTC