- From: Mounir Lamouri <notifications@github.com>
- Date: Tue, 12 Apr 2016 03:02:54 -0700
- To: w3c/permissions <permissions@noreply.github.com>
Received on Tuesday, 12 April 2016 10:03:22 UTC
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