-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission API updates #35768
Permission API updates #35768
Conversation
cdda306
to
08fa67b
Compare
> [!NOTE] | ||
> As of Firefox 44, the permissions for [Notifications](/en-US/docs/Web/API/Notifications_API) and [Push](/en-US/docs/Web/API/Push_API) have been merged. If permission is | ||
> granted (e.g. by the user, in the relevant permissions dialog), | ||
> `navigator.permissions.query()` will return `true` for both | ||
> `notifications` and `push`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI have pushed to BCD mdn/browser-compat-data#24359
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super, ty
default state, which is usually `prompt`. | ||
This method is called on the global {{domxref("Permissions")}} object | ||
{{domxref("navigator.permissions")}}. | ||
The **`revoke()`** method of the {{domxref("Permissions")}} interface reverts a currently set permission back to its default state, which is usually `prompt`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should delete this page IMO. Am asking on BCD how they feel: mdn/browser-compat-data#24359
EDIT - unfortunately it doesn't meet BCD guidelines for removal, even though this is not implemented except behind a flag.
This comment was marked as spam.
This comment was marked as spam.
## Examples | ||
|
||
We have created a simple example called Location Finder. | ||
You can [run the example live](https://chrisdavidmills.github.io/location-finder-permissions-api/), [view the source code on GitHub](https://github.com/chrisdavidmills/location-finder-permissions-api/tree/gh-pages), or read more about how it works in our article [Using the Permissions API](/en-US/docs/Web/API/Permissions_API/Using_the_Permissions_API). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for us it's under chrisdavidmills.github.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, saw that. MOve ownership, or create a new repo with sub folders for different APIs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Hamish! A couple of comments, but nothing blocking! Leaving a +1 for when you've had a look
Co-authored-by: Brian Thomas Smith <[email protected]>
Thanks for review @bsmth - I've accepted all (or with slight modification). Merging now because I'm away for a week and this is good. |
* Permission API updates * Update permissions with geolocation links * Fix watchposition bug * Get rid of the forward looking stuff * Tidy concepts * Apply suggestions from code review Co-authored-by: Brian Thomas Smith <[email protected]> --------- Co-authored-by: Brian Thomas Smith <[email protected]>
This is a "refresh" of the Permissions API docs. I'm doing it as part of looking at addition of
microphone
andcamera
permissions. The docs are a bit dated - they won't be perfect after this, but they will be better.The main change is to try to cut back some of the future looking behaviour that was written back when this was created. The story is now stable:
I also added a security considerations section for the Geolocation overview page. Next iteration of these docs I'd hope to perhaps do this for all the permission using APIs. From that I could add a list of things that cause the permission prompt to this doc.
Related docs work can be tracked in #35765