- From: Michael van Ouwerkerk <notifications@github.com>
- Date: Mon, 20 Apr 2015 05:18:32 -0700
- To: w3c/permissions <permissions@noreply.github.com>
Received on Monday, 20 April 2015 12:19:05 UTC
`PermissionStatus` has an attribute called `status` that is of type `PermissionState`. This seems to mildly confuse one with the other. It would be more correct to rename the attribute to `state` to correctly reflect its type. The geolocation javascript example should then read as follows: ``` javascript navigator.permissions.query({name:'geolocation'}).then(function(status) { if (status.state == 'granted') { showLocalNewsWithGeolocation(); } else if (status.state == 'prompt') { showButtonToEnableLocalNews(); } // Don't do anything if the permission was denied. }); ``` --- Reply to this email directly or view it on GitHub: https://github.com/w3c/permissions/issues/31
Received on Monday, 20 April 2015 12:19:05 UTC