Skip to content
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

Reason for deprecation of permissions.revoke() #26557

Closed
asleeguilez opened this issue May 3, 2023 · 8 comments · Fixed by #34578
Closed

Reason for deprecation of permissions.revoke() #26557

asleeguilez opened this issue May 3, 2023 · 8 comments · Fixed by #34578
Labels
area: Permissions Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!

Comments

@asleeguilez
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Permissions/revoke

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

who replaces this function?

What did you expect to see?

who replaces this function?

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@asleeguilez asleeguilez added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 3, 2023
@github-actions github-actions bot added the Content:WebAPI Web API docs label May 3, 2023
@postmeback
Copy link
Contributor

I searched on the internet about this function. It seems that, there is no alternative to this functionality.

@advitiya7
Copy link
Contributor

I searched on the internet about this function. It seems that, there is no alternative to this functionality.

@postmeback i think the alternative to permissions.revoke() is to use the navigator.permissions.query() method to check whether the user given the permission to the API or not then we can use navigator.permissions.request() to check whether the permission is given or not

@Josh-Cena
Copy link
Member

The right way to search for web standard issues is not through Google but through the spec repo itself. In this case you will find w3c/permissions#46. The answer would be "it's replaced with nothing because it just doesn't make sense". We can add this info to this page.

@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels May 18, 2023
@Josh-Cena Josh-Cena changed the title How do I revoke notification permissions? Reason for deprecation of permissions.revoke() May 18, 2023
@advitiya7
Copy link
Contributor

The right way to search for web standard issues is not through Google but through the spec repo itself. In this case you will find w3c/permissions#46. The answer would be "it's replaced with nothing because it just doesn't make sense". We can add this info to this page.

can't we add a new method because if someone wants to do it they can using navigator.permissions.query()
or we just have to add the reason for depreciation? either way i can do it

@Josh-Cena
Copy link
Member

@advitiya7 The query() method is read-only and IIUC, the permissions API is meant to be persistent rather than transient. I don't think you can meaningfully replace revoke() with anything (to restore to the "unauthorized" state), so a mention of the deprecation reason is good enough. I reckon you just need to read through that issue and summarize the points raised there. Mind how the subject may change within the thread and only document meaningful parts.

@advitiya7
Copy link
Contributor

@advitiya7 The query() method is read-only and IIUC, the permissions API is meant to be persistent rather than transient. I don't think you can meaningfully replace revoke() with anything (to restore to the "unauthorized" state), so a mention of the deprecation reason is good enough. I reckon you just need to read through that issue and summarize the points raised there. Mind how the subject may change within the thread and only document meaningful parts.

@Josh-Cena thanks for the explanation some of the points i was not able to understand but i will try my best to understand them

@Josh-Cena
Copy link
Member

Also note that this page will probably be deleted at some point because I can't imagine any browser shipping it. Therefore we should probably add the rationale for the lack of the revoke method to the landing page as well.

@advitiya7
Copy link
Contributor

Also note that this page will probably be deleted at some point because I can't imagine any browser shipping it. Therefore we should probably add the rationale for the lack of the revoke method to the landing page as well.

That seems reasonable can you what changes should i make? Or it is better left as it is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Permissions Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants