Re: [w3c/permissions] Support minimizable request UI with permissions.request() (#76)

Firefox might consider the "minimizing" as a dismissal of the prompt. I guess that's a UA-specific decision.

Regarding the changes you asked, I believe the spec supports what you are asking for but let me know if I misunderstood:
* being aware of the user dismissing:
```js
navigator.permission.request().then(function(p) {
  if (p.state == 'prompt') // user dismissed
});
```

* being aware if the user came back and changed the permission
```js
navigator.permission.request().then(function(p) {
  p.onchange = function() {
    // new state will be in p.state
  };
});
```
This can even be done without requesting:
```js
navigator.permission.query().then(function(p) {
  p.onchange = function() {
    // new state will be in p.state
  };
});
```

---
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/76#issuecomment-208827868

Received on Tuesday, 12 April 2016 10:03:22 UTC